Integrated: 8174819: java/nio/file/WatchService/LotsOfEvents.java fails intermittently

Jaikiran Pai jpai at openjdk.java.net
Tue Sep 28 04:57:57 UTC 2021


On Sat, 25 Sep 2021 07:02:12 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

> Can I please get a review for this test-only change that aims to fix an intermittent failure in `LotsOfEvents` testcase?
> 
> As noted by Alan in the JBS issue https://bugs.openjdk.java.net/browse/JDK-8174819, the test failure is likely due to the relatively smaller poll timeout that it currently uses. IMO, this guess is proved right by the diagnostic logs that the test is currently printing, as I note in my comment in that JBS issue.
> 
> The commit in this PR increases the 2 second timeout that was used (only) in the loop to 15 seconds to make it match the poll timeout that is used outside the loop. IMO, this increase in timeout shouldn't really slow down the test, since this is the "max amount of time to wait". The 13 second additional wait would ideally only show for the "last" poll where there are no more events.
> 
> Additionally, this commit also adds a few more diagnostic logs for future use, if this test fails in future.
> 
> Do note that there's also a `testModifyEventsQueuing` test method which too uses a 2 second timeout in a loop. I haven't touched/changed that timeout, since that test hasn't yet failed (perhaps because the number of events generated there are just 100 as against 1024 in this `testOverflowEvent` test). If at all that other test fails any time in future, we can perhaps consider increasing the timeout there too.

This pull request has now been integrated.

Changeset: 633eab23
Author:    Jaikiran Pai <jpai at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/633eab23f0c5cadac06e37b9d6eeef5696ca3d22
Stats:     13 lines in 1 file changed: 10 ins; 0 del; 3 mod

8174819: java/nio/file/WatchService/LotsOfEvents.java fails intermittently

Reviewed-by: alanb

-------------

PR: https://git.openjdk.java.net/jdk/pull/5693


More information about the nio-dev mailing list