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 race condition of timeout thread interrupt to stabilize multi level build tests (#4254)
The basic problem was that `thread.interrupt()` running before
`interrupt = false` meant there was a chance the thread's `if
(interrupt) {` conditional would be `true`, resulting in the timeout
thread timing out the open socket immediately, and the Mill server
process shutting down.
The solution is to move `interrupt = false` to before
`thread.interrupt()`
This should hopefully fix the flakiness in multi-level-build tests,
where the process shutting down would cause the next command to re-spawn
a new process, resulting in all classloaders to be re-spawned, violating
our assertions
Improved the test error checking so next time a similar thing happens,
we get more precise reporting "an unwanted process restart occurred",
rather than just "classloader invalidation was unexpected".
Tested manually with `while ./mill
'integration.invalidation[multi-level-editing].server.test'; do :;
done`. This seems to reproduce the problem on my laptop in a few tens of
minutes without this fix, after this fix I haven't managed to make it
appear
0 commit comments