Skip to content
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

Fix spurious yield_defers_until_park test #5634

Merged
merged 2 commits into from
Apr 20, 2023

Conversation

Darksonn
Copy link
Contributor

This test is flaky. Only fail it if it is failing consistently.

@Darksonn Darksonn added A-tokio Area: The main tokio crate M-runtime Module: tokio/runtime labels Apr 20, 2023
@Darksonn Darksonn requested a review from taiki-e April 20, 2023 12:20
}

// Wait a bit and run the test again.
std::thread::sleep(std::time::Duration::from_secs(2));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any rationale for 2 seconds in particular? wondering if we could get away with a shorter sleep so this test doesn't take 20s to run...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It only sleeps if it actually fails, which is very rare.

Presumably if this fails, that's because the kernel is too busy handling other tests to deliver the IO event. I picked 2 seconds since the other tests in this file are likely to be done by then.

I don't think the duration it takes when we've broken the test is important.

@Darksonn Darksonn merged commit b9868b2 into master Apr 20, 2023
@Darksonn Darksonn deleted the alice/fix-spurious-yield_defers_until_park branch April 20, 2023 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate M-runtime Module: tokio/runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants