-
-
Notifications
You must be signed in to change notification settings - Fork 15.8k
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
Make transport and MockTicker tests more stable #13713
Conversation
Motivation: A number of flaky tests were identified. Modification: Address test isolation failures and resource exhaustion errors. Also enable parallel test execution, becuase the tests can probably tolerate that now. Result: Tests in the transport module should now run stable enough to run in parallel.
cdba967
to
87949f9
Compare
Also made the test run dramatically faster. We don't need to wait that long to confirm that a future hasn't completed.
Thread.sleep(50); | ||
} catch (InterruptedException e) { | ||
// Ignore | ||
} | ||
allTimeStampsLatch.countDown(); | ||
}, 100, 100, TimeUnit.MILLISECONDS); |
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.
Are these windows a bit stingy? It seems pretty easy for a CI thread to lose 100 ms.
transport/src/test/java/io/netty5/channel/nio/NioEventLoopTest.java
Outdated
Show resolved
Hide resolved
common/src/test/java/io/netty5/util/concurrent/DefaultMockTickerTest.java
Show resolved
Hide resolved
|
The test tended to run out of memory by filling up the executor task queue.
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.
Thanks @chrisvest!
Panama build looks like it got stuck on uploading its docker cache. |
Motivation:
A number of flaky tests were identified.
Modification:
Address test isolation failures and resource exhaustion errors.
Also enable parallel test execution, becuase the tests can probably tolerate that now.
Improve the DefaultMockTicker test to be deterministic, by adding the ability to wait for other threads to enter the sleep method.
Result:
Tests in the transport module should now run stable enough to run in parallel.
All the tests can now also be run in repeat.