You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each simulation is single-threaded, so it makes sense to evaluate different
testfiles in parallel.
A complication is that each simulation logs using our default logging library,
and since that is a singleton, we can't provide each simulation with its own
logger. When a subtest is a parallel test (as is the case here), it waits for
the parent test to return before running. This means that the `log.Scope` in
`TestDataDriven` would be cleaned up by the time the parallel subtests would
actually start simulating. I'm avoiding this by creating the scope, but then
releasing it via `t.Cleanup`, which only runs when all subtests have completed.
Something similar is done with `leaktest.AfterTest`.
```
./dev test pkg/kv/kvserver/asim/tests -f 'TestDataDriven' --ignore-cache --rewrite -v -- --test_env COCKROACH_RUN_ASIM_TESTS=true
//pkg/kv/kvserver/asim/tests:tests_test PASSED in 202.1s # before
//pkg/kv/kvserver/asim/tests:tests_test PASSED in 60.6s # after
```
Epic: CRDB-25222
0 commit comments