RFR: 8264539: Improve failure message of java/nio/file/WatchService/SensitivityModifier.java
Brian Burkhalter
bpb at openjdk.java.net
Thu Apr 1 16:29:26 UTC 2021
On Thu, 1 Apr 2021 11:09:06 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Please consider this request to improve the message printed when no `ENTRY_MODIFY` events are received. In the polling implementation of `WatchService` currently used on macOS, it would be useful to know the sensitivity of polling in effect for the failing case. It might indicate, for example, that low sensitivity should not be used in the test.
>
> test/jdk/java/nio/file/WatchService/SensitivityModifier.java line 126:
>
>> 124: String msg = String.format("No ENTRY_MODIFY event received for %s (dir: %s, sensitivity: %d)",
>> 125: file, parent, pathToTime.get(parent));
>> 126: throw new RuntimeException(msg);
>
> Not clear to me that this helps. Have you looked at changing the 1s at L104. I assume the issue is that the test needs the idle (no events) time increased to deal with cases where the watcher is slow to queue events.
That's a better idea but I think this change should go in also. I have not in any case been able to reproduce it. There is no record of on which specific machines it was sighted.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3290
More information about the nio-dev
mailing list