-
Notifications
You must be signed in to change notification settings - Fork 731
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
Fixes flaky test #2798
Fixes flaky test #2798
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a good solution for handling test flakiness, very clever!
in the past, we've generally solved this kind of issue by isolating the tests in their own test files, but the approach of using a single test function with both tests in sequence seems much less annoying.
thank you for the fix!
fixes https://github.com/tokio-rs/tracing/actions/runs/6785393202/job/18443641813 cargo test runs tests in the same file in parallel by default, causing race condition, this can be proven by running `cargo test --test reload -- --test-threads=1` => successes `cargo test --test reload -- --test-threads=2` => flaky multiple times This fix runs only the two tests in serial. We could seperate the tests in different files, but they share the same testing dependencies, so I left them in the same file.
fixes https://github.com/tokio-rs/tracing/actions/runs/6785393202/job/18443641813 cargo test runs tests in the same file in parallel by default, causing race condition, this can be proven by running `cargo test --test reload -- --test-threads=1` => successes `cargo test --test reload -- --test-threads=2` => flaky multiple times This fix runs only the two tests in serial. We could seperate the tests in different files, but they share the same testing dependencies, so I left them in the same file.
fixes https://github.com/tokio-rs/tracing/actions/runs/6785393202/job/18443641813 cargo test runs tests in the same file in parallel by default, causing race condition, this can be proven by running `cargo test --test reload -- --test-threads=1` => successes `cargo test --test reload -- --test-threads=2` => flaky multiple times This fix runs only the two tests in serial. We could seperate the tests in different files, but they share the same testing dependencies, so I left them in the same file.
fixes https://github.com/tokio-rs/tracing/actions/runs/6785393202/job/18443641813
cargo test runs tests in the same file in parallel by default, causing race condition,
this can be proven by running
cargo test --test reload -- --test-threads=1
=> successescargo test --test reload -- --test-threads=2
=> flakymultiple times
This fix runs only the two tests in serial.
We could seperate the tests in different files, but they share the same testing dependencies, so I left them in the same file.