Skip to content

Commit

Permalink
Fixing broken tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
renemadsen committed May 29, 2024
1 parent 060007e commit 8f41763
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 17 deletions.
5 changes: 3 additions & 2 deletions Rebus.RabbitMq.Tests/Rebus.RabbitMq.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="RabbitMQ.Client" Version="6.8.1" />
<PackageReference Include="Microting.Rebus" Version="8.0.2" />
<PackageReference Include="Microting.Rebus.Tests.Contracts" Version="8.0.2" />
<PackageReference Include="Microting.Rebus" Version="8.0.4" />
<PackageReference Include="Microting.Rebus.Tests.Contracts" Version="8.0.4" />
<PackageReference Include="Testcontainers.RabbitMq" Version="3.8.0" />
</ItemGroup>
<ItemGroup>
<Folder Include="Internals\" />
Expand Down
16 changes: 2 additions & 14 deletions Rebus.RabbitMq.Tests/TestRabbitExpress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,8 @@ public async Task TestPerformance(int messageCount, bool express, bool enableBat
.Transport(t => t.UseRabbitMq(RabbitMqTransportFactory.ConnectionString, _queueName).SetBatchSize(enableBatching ? 100 : 1))
.Options(o => o.SetMaxParallelism(100))
.Start();
}

[TestCase(10, true)]
[TestCase(10, false)]
[TestCase(10000, true)]
[TestCase(10000, false)]
public async Task TestPerformance(int messageCount, bool express)
{
var receivedMessages = 0L;

_bus.Advanced.Workers.SetNumberOfWorkers(0);

_activator.Handle<object>(async _ => Interlocked.Increment(ref receivedMessages));
bus.Advanced.Workers.SetNumberOfWorkers(0);

var stopwatch = Stopwatch.StartNew();

Expand All @@ -71,7 +60,6 @@ public async Task TestPerformance(int messageCount, bool express)
{
using var scope = new RebusTransactionScope();


foreach (var msg in batch)
{
await bus.SendLocal(msg);
Expand Down Expand Up @@ -118,4 +106,4 @@ public ExpressAttribute() : base(Headers.Express, "")
{
}
}
}
}
2 changes: 1 addition & 1 deletion Rebus.RabbitMq/Rebus.RabbitMq.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<PackageId>Microting.Rebus.RabbitMq</PackageId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microting.Rebus" Version="8.0.2" />
<PackageReference Include="Microting.Rebus" Version="8.0.4" />
<PackageReference Include="RabbitMq.Client" Version="6.8.1" />
</ItemGroup>
<ItemGroup>
Expand Down

0 comments on commit 8f41763

Please sign in to comment.