Use `cargo-nextest`?
Our test suite is kinda hacky because we really want to test with specific environment variables set, but we cannot easily set those because Cargo tests are run in parallel in different threads.
Using cargo-nextest to run our test suite would solve that issue, since it runs each #[test] in it's own process (but still in parallel), and thus setting an environment variable would not affect other test runs. See also https://github.com/rust-lang/rust/issues/47506 and https://github.com/rust-lang/rust/issues/67650.
WDYT @NobodyXu?
Yeah it's a really good idea I didn't think of!
Previous I only consider cargo-nextest if performance matters, I forgot that its process model would help isolate tests and would be especially useful for us because our tests sets environment variables
Yeah it's a really good idea I didn't think of!
Previous I only consider cargo-nextest if performance matters, I forgot that its process model would help isolate tests and would be especially useful for us because our tests sets environment variables