cog
1463d774 - Fix stream_redirector_race_condition test

Commit
1 year ago
Fix stream_redirector_race_condition test We don't really understand why this test starts failing when we switch to the new non-blocking worker, as nothing inside the `_ChildWorker` process should have changed as part of this work. The failure is due to a failure to drain the wrapped STDOUT/STDERR streams within the hard-coded one second timeout. Writes occasionally take nearly 100µs in this test (because the events channel is being spammed with huge output objects), which is more than enough to make it hard to flush 10k lines within a second. Regardless, we'd like to know when this happens, so we've reworked the drain call to raise a TimeoutError, which we can then catch and reraise, adding a log line to the relevant prediction before we do so that we can at least understand what's happening. We've also just increased how long we're prepared to wait for the drain -- up to ten seconds -- which we hope will be more than enough for any non-pathological case.
Author
Committer
Parents
Loading