leaderboard_plugin opt-in/opt-out tests are flaky under parallel execution #5
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
The four
leaderboard_pluginopt-in/opt-out tests fail intermittently when running the fullcargo test --workspacesuite in parallel, but pass 100% of the time when run in isolation:Failing tests:
opt_in_error_fires_warning_toastopt_in_success_sets_opted_in_flagopt_out_error_fires_warning_toastopt_out_success_clears_opted_in_flagLikely Cause
Shared mutable state or a global resource in the test setup is not isolated between test threads. When the full workspace runs with Rust's default parallel test runner, another test in a different module appears to interfere with these tests' ECS world or resource initialisation.
Impact
Blocks
cargo test --workspacefrom being a reliable CI gate — these tests produce false negatives on every clean run.Suggested Fix
Audit
leaderboard_plugin::testssetup for any global/static state. Consider adding#[serial_test::serial]on the affected tests, or refactoring shared setup into a per-test helper that constructs a freshApp.