RFR: 8297275: WatchService delay with PollingWatchService causes test failures
Alan Bateman
alanb at openjdk.org
Tue Nov 22 08:45:34 UTC 2022
On Mon, 21 Nov 2022 22:01:05 GMT, Tyler Steele <tsteele at openjdk.org> wrote:
> This is another possible solution. I wanted to err on the side of the failure being valid. Once the call to `register()` completes, I think it's fair to expect that the WatchKey is active.
I think you mean "valid" rather than "active". When you register a directory with a WatchService then it will valid (isValid method) until the key is cancelled or the WatchService is closed.
I think you'll need to paste in a reproducer or at least outline what the test does in other to make progress. Adding a 1s delay to Path.register to make a test pass just doesn't make sense. If the issue is AIX specific then maybe you can say something about the file system and the granularity of the file modification time. The polling WatchService works by polling the file modification time and maybe the issue is that it's not being updated on these systems?
-------------
PR: https://git.openjdk.org/jdk/pull/10824
More information about the nio-dev
mailing list