Details
-
Bug
-
Resolution: Unresolved
-
Neutral
-
None
-
None
-
None
-
None
Description
The test cases in class DirectoryWatchterTest test whether a file has been registered, deleted, or modified by the DirectoryWatcher. These tests are written with timeouts in order to compensate for factors such as slow disk or under pressure system (e.g. Jenkins build). Under certain circumstances these tests nevertheless fail and result in build failures for unrelated issues (an undesirable outcome).
Using completable futures API to have a hook on the watcher when it is completed. For this, the public API method register(...) which has a void return type needs to be unfortunately modified to have a return type of the list of futures which can be waited on for completion. The consequence is possibly breaking API changes for third parties which might be replying on this code. To reduce the impact a planned deprecation could be a solution to the side effect.