diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/PathWatcherTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/PathWatcherTest.java index 5e05758366c..e9263a20f78 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/PathWatcherTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/PathWatcherTest.java @@ -46,7 +46,7 @@ import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; -@Ignore("Disabled due to behavioral differences in various FileSystems (hard to write a single testcase that works in all scenarios)") +// @Ignore("Disabled due to behavioral differences in various FileSystems (hard to write a single testcase that works in all scenarios)") public class PathWatcherTest { public static class PathWatchEventCapture implements PathWatcher.Listener @@ -81,6 +81,18 @@ public class PathWatcherTest { synchronized (events) { + Path relativePath = this.baseDir.relativize(event.getPath()); + String key = relativePath.toString().replace(File.separatorChar,'/'); + + List types = this.events.get(key); + if (types == null) + { + types = new ArrayList<>(); + } + types.add(event.getType()); + this.events.put(key,types); + LOG.debug("Captured Event: {} | {}",event.getType(),key); + //if triggered by path if (triggerPath != null) { @@ -95,19 +107,6 @@ public class PathWatcherTest { finishedLatch.countDown(); } - - - Path relativePath = this.baseDir.relativize(event.getPath()); - String key = relativePath.toString().replace(File.separatorChar,'/'); - - List types = this.events.get(key); - if (types == null) - { - types = new ArrayList<>(); - } - types.add(event.getType()); - this.events.put(key,types); - LOG.debug("Captured Event: {} | {}",event.getType(),key); } }