8184961: jdk.test.lib.util.FileUtils.deleteFileWithRetry0 should wait for absence of a file
authoranazarov
Tue, 25 Jul 2017 17:04:46 -0700
changeset 45920 ddc079e73172
parent 45919 d05d9a1f82a0
child 45922 89ff0e7a94bd
8184961: jdk.test.lib.util.FileUtils.deleteFileWithRetry0 should wait for absence of a file Reviewed-by: bpb
test/lib/jdk/test/lib/util/FileUtils.java
--- a/test/lib/jdk/test/lib/util/FileUtils.java	Thu Jul 20 18:17:12 2017 +0000
+++ b/test/lib/jdk/test/lib/util/FileUtils.java	Tue Jul 25 17:04:46 2017 -0700
@@ -98,7 +98,7 @@
         while (true) {
             try {
                 Files.delete(path);
-                while (Files.exists(path)) {
+                while (!Files.notExists(path)) {
                     times++;
                     if (times > MAX_RETRY_DELETE_TIMES) {
                         throw new IOException("File still exists after " + times + " waits.");