alexcrichton opened PR #6577 from alexcrichton:fix-flaky-test
to bytecodealliance:main
:
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.<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested pchickey for a review on PR #6577.
alexcrichton requested wasmtime-core-reviewers for a review on PR #6577.
alexcrichton updated PR #6577.
pchickey submitted PR review.
alexcrichton updated PR #6577.
alexcrichton has enabled auto merge for PR #6577.
alexcrichton merged PR #6577.
Last updated: Nov 22 2024 at 16:03 UTC