RFR: 8297275: WatchService delay with PollingWatchService causes test failures

Alan Bateman alanb at openjdk.org
Tue Nov 22 19:32:19 UTC 2022


On Tue, 22 Nov 2022 17:44:27 GMT, Tyler Steele <tsteele at openjdk.org> wrote:

> The failing test is register_and_poll in JCK17. The JCK is copyrighted, so I'm not able to post about it publicly, but I believe you should have access to it.
> 
> Currently, PollingWatchService is used only on BSD/Macos and AIX. I don't believe the issue is platform specific. I think the issue that I describe below is extant on all platforms that use PollingWatchService, but some amount of platform specificity may make it more prominent on AIX.

I think the issue is that the test registers a directory and immediately modifies a file in that directory. To an observer using the PollingWatchService, the file last modification time has not changed so the watch key is not queued. What is the precision of the time of last modification on AIX? On macOS there is nano precision timestamps so this might explain why the issue has not been observed there. In this case, this seems like something that the test needs to deal with.

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

PR: https://git.openjdk.org/jdk/pull/10824


More information about the nio-dev mailing list