-
Notifications
You must be signed in to change notification settings - Fork 506
Fix occasional test failure due to env::set_var with multiple test threads #421
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
Conversation
Thanks! Could this also remove the |
This and #419 are the only problems I've encountered with parallel test threads. Unfortunately, the work I've been doing on |
It seems the intention of this PR is to basically enable |
I guess you're suggesting that I remove |
Tests that modify environment variables (e.g. CFLAGS and CXXFLAGS) can cause tests to fail when run in parallel because they change a shared context. This change moves the problematic tests into separate modules. Since each `tests/*.rs` is compiled as a separate crate, these tests are not run in parallel with other tests.
It seems like my hack (aa968a0) is not enough to “fix” #419 on Azure (build results). |
Ah ok, if that's the case mind if we hold off on this? Right now the test suite just needs to be run with one thread, but if there's more lurking then I'd prefer if it were all fixed instead of only having half of it fixed |
Alternatively, with d098048 implemented, it seems like you only need |
Okay, I think I've fixed all the test threads issues. The failures in the build results appear to be network-related. |
Huh. I accidentally deleted the branch, which closed the PR. Then, I restored it and re-opened the PR. And that had the unexpected result of re-running the Azure build. 🤷♂ |
Tests that modify environment variables (e.g.
CFLAGS
andCXXFLAGS
) can cause tests to fail when run in parallel because they change a shared context.This change moves the problematic tests into separate modules. Since each
tests/*.rs
is compiled as a separate crate, these tests are not run in parallel with other tests.