RFR: 8264539: Improve failure message of java/nio/file/WatchService/SensitivityModifier.java

Alan Bateman alanb at openjdk.java.net
Thu Apr 1 11:12:26 UTC 2021


On Wed, 31 Mar 2021 20:22:31 GMT, Brian Burkhalter <bpb 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.

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

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


More information about the nio-dev mailing list