Browse Source
This commit fixes a test that has failed on CI and seems flaky. This test asserts that stderr/stdout are writable and that a 200ms timeout does not elapse when calculating this. The implementation, on Windows at least, of `poll_oneoff` always reports stdout/stderr as "ready for write" meaning that this test should trivially pass. The flakiness comes from the timeout parameter where apparently sometimes on CI the determination of this takes more than 200ms. This means that the timer subscription may or may not fire depending on the timing of the test, and currently the test always fails if the timeout subscription fires. This commit updates the test to store whether a timeout has passed and only fail if `poll_oneoff` is attempted when the timeout has already elapsed. This will allow the timeout to fire so long as the two streams are considered writable at the same time, achieving the desired result of the test to assert that, without timing out both stdout and stderr are considered writable.pull/6615/head
Alex Crichton
1 year ago
committed by
GitHub
1 changed files with 5 additions and 3 deletions
Loading…
Reference in new issue