chore: make integration tests run concurrently #924
+159
−90
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #923
This PR makes integration tests re-use the same set of docker containers, hence allowing them to be run concurrently
shared
module, with a single top-levelmain.rs
file, thus requiring only one compilation step (as opposed to compiling every test file individuallyset_test_fixture
is made sync, since there's no async code in itOnceLock
, so that it is invoked only once for the resulting (shared) test binary; it also has a corresponding destructor to spin down the containers after the tests runmain.rs
(top-level); otherwise they should be created in theshared
module#[serial]
)Finally, with this change my integration test runs go from taking ~3.5 minutes down to 30 seconds.