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

Separate out Unit, Integration and Parallel Integration tests #1409

Merged

Conversation

lukebakken
Copy link
Contributor

Start by moving some projects around

@lukebakken lukebakken self-assigned this Oct 26, 2023
@lukebakken lukebakken added this to the 7.0.0 milestone Oct 26, 2023
@stebet
Copy link
Contributor

stebet commented Oct 27, 2023

As an idea. I once experimented with moving all the unit tests that affect everyone (like server restarts, backoff thresholds) ti a separate project so they don't run at the same time as "normal" tests. That allowed me to run the bulk of the tests in parallel and then all the "server-manipulating" ones later, which cut down the test time considerably.

Might be something to consider.

@michaelklishin
Copy link
Member

@stebet that's how we split unit and integration tests in many sub-projects related to RabbitMQ, in particular all the Common Test suites in RabbitMQ itself. CT supports parallel runs.

Note that if an integration test relies on any inherent shared state it'd have to be moved to the "sequential" group regardless of whether it manipulates nodes.

@lukebakken
Copy link
Contributor Author

As an idea. I once experimented with moving all the unit tests that affect everyone (like server restarts, backoff thresholds) ti a separate project so they don't run at the same time as "normal" tests.

@stebet yep that's my plan! I want to have tests grouped into the appropriate projects so I can run them as parallel github actions workflows.

@lukebakken lukebakken force-pushed the lukebakken/faster-test-suites branch from 25ae13c to 6c8d953 Compare November 2, 2023 20:11
@lukebakken lukebakken requested a review from stebet November 2, 2023 20:12
@lukebakken lukebakken marked this pull request as ready for review November 2, 2023 20:12
@lukebakken
Copy link
Contributor Author

@stebet @michaelklishin well, I've tried to get the Test.Integration tests to run using Xunit's parallel feature, but there are flaky test results. This is most likely indicative of bugs in the test suite, or the library itself. My guess is that it has to do with mixing sync / async code at times.

What I'm going to do for now is force those tests to be sequential so that CI passes. Then, merge this PR and #1347 so that there are no long-running branches.

Then, I will figure out what's up with the test suite not being parallel-izable.

@lukebakken lukebakken marked this pull request as draft November 2, 2023 20:46
@lukebakken lukebakken marked this pull request as ready for review November 3, 2023 17:27
* Creates dedicated test projects for parallel test execution (Integration.csproj) and sequential (SequentialIntegration.csproj).
* Ensures that the ThreadPool is set with enough threads.
* Ensures that all test connections have their client provided name set.
* Fix SequentialTests that require a unique connection name.
@lukebakken lukebakken force-pushed the lukebakken/faster-test-suites branch from dad59b7 to bea58e2 Compare November 3, 2023 17:28
@lukebakken lukebakken merged commit 168389b into lukebakken/async-operations Nov 3, 2023
@lukebakken lukebakken deleted the lukebakken/faster-test-suites branch November 3, 2023 17:29
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.

3 participants