RFR: 8174819: java/nio/file/WatchService/LotsOfEvents.java fails intermittently [v2]
Alan Bateman
alanb at openjdk.java.net
Mon Sep 27 05:17:05 UTC 2021
On Sun, 26 Sep 2021 12:31:33 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.
>
> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
>
> address review comments
Marked as reviewed by alanb (Reviewer).
-------------
PR: https://git.openjdk.java.net/jdk/pull/5693
More information about the nio-dev
mailing list