pardahlman / RawRabbit

A modern .NET framework for communication over RabbitMq
MIT License
747 stars 144 forks source link

Executing all tests from CLI undeterministically fails after upgrade to csproj #212

Closed pardahlman closed 7 years ago

pardahlman commented 7 years ago

RawRabbit uses the .NET CLI to execute it's tests. Since the integration tests uses the same message broker and also the same types of messages, the tests in the suite needs to be executed in sequence in order to secure that the tests doesn't interfere with each other.

Previously, this has been successfully done by providing the parallel flag to the command

 dotnet test -parallel none

However, this option is no longer available. After talking to the xUnit team, they recommended using xunit.runner.json and set parallelizeTestCollections to false.

This helps with running the tests in parallel, but the test suite still fails. Looking at the consumers, channels and connection in the management plugin, I can confirm that there more of them than I expect.

The problem does not occur if I run the test one at a time.

pardahlman commented 7 years ago

Not sure what I changed, but the tests runs as expected again 🤷‍♂️