-
Notifications
You must be signed in to change notification settings - Fork 1
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
Investigate flaky test in AsyncTest #1070
Comments
This just happened several more times in (dependabot) PR #1071 |
Hopefully temporary, but change shouldSucceed_WhenTheFutureCompletes_BeforeTimeout to a RetryingTest so that it (hopefully) will consistently pass when running in GitHub actions. Relatest to #1070
Hopefully temporary, but change shouldSucceed_WhenTheFutureCompletes_BeforeTimeout to a RetryingTest so that it (hopefully) will consistently pass when running in GitHub actions. Relatest to #1070
No, GitHub, "Relates to" should not close an issue...so, I am re-opening |
This is not fixed. I merely made that test a retrying test, which is 100% not a fix. It is just something to make sure the tests pass, and provide more time for investigation. |
There are now four tests that use return doAsync(supplier, ForkJoinPool.commonPool()); I am wondering if it's possible that the first call to And if it does turn out to be the problem, then we could probably call |
Ensure that the tests all pass consistently by canceling the futures in the tests where we expect to timeout before the tasks complete. Without canceling them, tests which call methods in Async that use the common ForkJoinPool can be blocked by tasks that are still executing from previous tests! So, in the three tests where waitFor/waitForAll/waitForAllIgnoringTypes time out before the tasks complete, wrap the assertions in a try/finally and cancel the futures in the finally block. This commit also removes the RetryingTest annotations on the four tests which had them and replaces them with the standard JUnit Test annotation. Hopefully this will be the last time we ever need to deal with flaky tests in Async. Closes #1070
In a few builds today, this error happened:
Why is this happening when the
ConcurrentTask
used inside this test has a default "task" duration of 10 milliseconds?The text was updated successfully, but these errors were encountered: