-
Notifications
You must be signed in to change notification settings - Fork 97
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
Parallelize e2e tests using docker #2023
Conversation
This is great! I was able to run the tests on my machine at commit bc6ccd2, the setup works at the start but then some random test fails (not the same test as in CI, but it's similar, with first a few successes). |
As is this is not salvageable as an actual PR. |
Description
Our e2e test setup has some significant limitations at the moment:
anvil
installeddocker-compose
script runningChanges
Where to begin... 😅
anvil
andpostgres
per testcontainers
even on panics or manual abortsflyway
version to significantly speed up test and make them actually reliable (old version could get stuck during migrations)--nocapture
again because--failure-output immediate
might be related to tests getting stuck (weird 🤷♂️ )anvil
but better safe than sorry, I guessCachingBalancerFetcher
andSolvableOrdersCache
)There are still a couple of hacky things left but the idea overall appears to be sound.
How to test
Build the
migrations
container image (once). This currently needed because I didn't find a nice way yet to build images fromDockerfile
s using the new cratebollard
yet.:docker build -t main-migrations:latest -f ./docker/Dockerfile.migration .
Run the tests with either command:
cargo test -- --ignored local_node
cargo nextest run -- --ignored local_node
Celebrate fast tests:

Please actually run the tests on your machines to see if we encounter any issues. Also try cancelling the tests and introduce panics in some tests to verify that the docker container cleanup is robust on multiple platforms.
Also @sunce86 I remember you are using windows. I did not yet implement signal handlers for aborting tests on windows because I'm not sure which signals to actually catch there. Do you know what gets sent when you ctrl-c something?
Related Issues
Fixes: #1845
Possibly also gets rid of the remaining flakyness of our test due to our switch to
anvil
.