mirror of
https://github.com/apache/maven-mvnd.git
synced 2025-09-26 05:58:27 +00:00
Raise watch service sensitivity, add a delay in the test for windows to make sure the poll has been done
This commit is contained in:
@@ -88,8 +88,17 @@ public class WatchServiceCacheFactory extends AbstractLogEnabled implements Cach
|
||||
getLogger().debug("Starting to watch path " + key);
|
||||
}
|
||||
try {
|
||||
WatchEvent.Modifier[] mods;
|
||||
try {
|
||||
mods = new WatchEvent.Modifier[] {
|
||||
com.sun.nio.file.SensitivityWatchEventModifier.HIGH
|
||||
};
|
||||
} catch (Throwable t) {
|
||||
mods = null;
|
||||
}
|
||||
final WatchKey watchKey = key.register(watchService,
|
||||
StandardWatchEventKinds.ENTRY_DELETE, StandardWatchEventKinds.ENTRY_MODIFY);
|
||||
new WatchEvent.Kind[] { StandardWatchEventKinds.ENTRY_DELETE, StandardWatchEventKinds.ENTRY_MODIFY },
|
||||
mods);
|
||||
return new Registration(watchKey);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
|
Reference in New Issue
Block a user