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
fix(test): every test in the ffi-thread file takes the pool lock, not just four
The first attempt locked only the tests whose ASSERTIONS depend on worker identity and
exempted the rest on the reasoning that they hold under any scheduling. That is true of
what they assert and irrelevant to what they do: they call on_plugin_thread too, so they
take a worker, and a worker taken between the identity test's two calls is exactly the
failure. It still failed under `cargo test --workspace` with ThreadId(21) vs ThreadId(22),
adjacent ids, so the pool really had handed out a different worker.
The file has seven tests, not four, and one of them deliberately holds four workers
behind a barrier. Exempting a test from a lock because of what it asserts rather than
what it touches is the mistake; the shared resource does not care why you touched it.
Locking them costs nothing: none of the four newly-locked tests is about contention, so
each holds just as strongly run alone. 0 failures in 10 full-suite runs, against roughly
1 in 3 before.
0 commit comments