RFR: 8174819: java/nio/file/WatchService/LotsOfEvents.java fails intermittently [v2]

Jaikiran Pai jpai at openjdk.java.net
Sun Sep 26 12:31:36 UTC 2021


On Sun, 26 Sep 2021 08:21:19 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   address review comments
>
> test/jdk/java/nio/file/WatchService/LotsOfEvents.java line 111:
> 
>> 109:         while (key != null) {
>> 110:             List<WatchEvent<?>> events = key.pollEvents();
>> 111:             System.out.println("Polling retrieved " + events.size() + " events");
> 
> Minor nit, this should be "event(s)" to avoid "1 events".

Done. Addressed in latest version of PR.

> test/jdk/java/nio/file/WatchService/LotsOfEvents.java line 151:
> 
>> 149:                 Map<WatchEvent.Kind, Long> countPerEventType = events.stream()
>> 150:                         .collect(Collectors.groupingBy(WatchEvent::kind, Collectors.counting()));
>> 151:                 System.err.println("After extra polling, found:");
> 
> I assume the trace message at L151 is not needed. L146 will print the count and this will be followed by the count of each kind.

Done. Removed the (previous) L151 log message that was newly introduced in this PR.

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

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


More information about the nio-dev mailing list