--- old/test/lib/jdk/test/lib/util/FileUtils.java 2017-07-19 18:11:34.000000000 -0700 +++ new/test/lib/jdk/test/lib/util/FileUtils.java 2017-07-19 18:11:34.000000000 -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.");