8184961: jdk.test.lib.util.FileUtils.deleteFileWithRetry0 should wait for absence of a file

Reviewed-by: bpb
This commit is contained in:
Andrey Nazarov 2017-07-25 17:04:46 -07:00
parent 556bc16ab2
commit d362d3fe3a

View File

@ -98,7 +98,7 @@ public final class FileUtils {
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.");