7144086: TEST_BUG: java/nio/file/WatchService/SensitivityModifier.java failing intermittently
authoralanb
Thu, 09 Feb 2012 16:38:36 +0000
changeset 11834 0de27a1b7946
parent 11833 e522d55f4c3d
child 11835 c9e7cfc908b3
7144086: TEST_BUG: java/nio/file/WatchService/SensitivityModifier.java failing intermittently Reviewed-by: chegar
jdk/test/java/nio/file/WatchService/SensitivityModifier.java
--- a/jdk/test/java/nio/file/WatchService/SensitivityModifier.java	Thu Feb 09 13:43:15 2012 +0000
+++ b/jdk/test/java/nio/file/WatchService/SensitivityModifier.java	Thu Feb 09 16:38:36 2012 +0000
@@ -96,6 +96,7 @@
 
             // drain events (to avoid interference)
             do {
+                key.pollEvents();
                 key.reset();
                 key = watcher.poll(1, TimeUnit.SECONDS);
             } while (key != null);