-
Notifications
You must be signed in to change notification settings - Fork 478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wasm: fixes test flake on Windows and strict mode #3041
Conversation
/ok-to-test |
I’m only interested In the windows tests so I’ll stop all other tests |
Complete Build MatrixThe build status is currently not updated here. Please visit the action run below directly. Commit ref: 3df9a1c |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to be working yet. It still fails because the delay is exactly 0 so it's never "greater than".
I can't leave a comment there, but you'll need to change L219 to:
assert.GreaterOrEqual(t, duration, tc.minDuration)
assert.LessOrEqual(t, duration, tc.maxDuration)
ah thanks for the keen eye, you are right this expression is wrong. |
Windows clocks often don't give microsecond scope reading reliably. Our "strict mode" test was accidentally verifying a lower bound of time spent sleeping, when the important part is the upper bound. This removes the lower bound, so that tests pass on both unix and windows. See dapr#2884 (comment) Signed-off-by: Adrian Cole <[email protected]>
3df9a1c
to
44d7c35
Compare
/ok-to-test |
Complete Build MatrixThe build status is currently not updated here. Please visit the action run below directly. Commit ref: 44d7c35 |
Description
Windows clocks often don't give microsecond scope reading reliably. Our "strict mode" test was accidentally verifying a lower bound of time spent sleeping, when the important part is the upper bound. This removes the lower bound, so that tests pass on both unix and windows.
Issue reference
See #2884 (comment)
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: