Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replacing nUnit with xUnit and parallelizing tests where possible. #1025

Merged
merged 3 commits into from
Mar 10, 2021

Conversation

stebet
Copy link
Contributor

@stebet stebet commented Mar 9, 2021

Proposed Changes

Replacing nUnit with xUnit since xUnit is more widely used, has built-in code analyzers and has better parallelization options. Also fixed code in the main project that starts failing after updating Visual Studio to v16.9.

Types of Changes

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • Documentation improvements (corrections, new content, etc)
  • Cosmetic change (whitespace, formatting, etc)

Checklist

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • All tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in related repositories

@michaelklishin
Copy link
Member

I see a fair amount of these warnings when I ./run-test.sh on .NET Core 3.1 on macOS:

[xUnit.net 00:01:50.38]     RabbitMQ.Client.Unit.TestConnectionRecovery.TestRecoveryWithTopologyDisabled [FAIL]
[xUnit.net 00:01:50.38]       Microsoft.VisualStudio.TestPlatform.TestHost.DebugAssertException : Method <method> failed with 'columns[1] is not in expected format.
[xUnit.net 00:01:50.38]       ', and was translated to Microsoft.VisualStudio.TestPlatform.TestHost.DebugAssertException to avoid terminating the process hosting the test.
  Failed RabbitMQ.Client.Unit.TestConnectionRecovery.TestRecoveryWithTopologyDisabled [446 ms]
  Error Message:
   Microsoft.VisualStudio.TestPlatform.TestHost.DebugAssertException : Method <method> failed with 'columns[1] is not in expected format.
', and was translated to Microsoft.VisualStudio.TestPlatform.TestHost.DebugAssertException to avoid terminating the process hosting the test.

@michaelklishin
Copy link
Member

Never mind, this has to do with me running against a RabbitMQ node build from a development PR. In other words, rabbitmqctl output and not this test. Trying with 3.8.14 now.

@michaelklishin
Copy link
Member

Nope, the error is also present with 3.8.14 and has to do with how RabbitMQCtl.ListConnections parses the output. Comparing with master next.

@michaelklishin
Copy link
Member

./build.sh; dotnet test projects/Unit -f netcoreapp3.1 --filter "FullyQualifiedName~RabbitMQ.Client.Unit.TestConnectionRecovery"

passes on both branches. Trying to reproduce on two separate machines now.

Copy link
Member

@michaelklishin michaelklishin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason

export RABBITMQ_RABBITMQCTL_PATH=rabbitmqctl; dotnet test projects/Unit; ./run-test.sh

against a 3.8.14 node passes (twice) in master but not on this branch. Something affects
how

rabbitmqctl list_connections -s pid client_properties

output is parsed.

@michaelklishin
Copy link
Member

Curiously, running the connection recovery test suite alone executed like this:

RABBITMQ_RABBITMQCTL_PATH=rabbitmqctl dotnet test projects/Unit --filter "FullyQualifiedName~RabbitMQ.Client.Unit.TestConnectionRecovery"

passes on this branch.

@stebet
Copy link
Contributor Author

stebet commented Mar 9, 2021

Interesting. I'll take a look.

@stebet
Copy link
Contributor Author

stebet commented Mar 10, 2021

Made a change to how the names are parsed to try and fix things @michaelklishin.

@michaelklishin
Copy link
Member

That helped, thank you.

@michaelklishin michaelklishin merged commit d6a11d9 into rabbitmq:master Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants