8169971: JLinkMultiReleaseJarTest.java fails intermittently at the final clean up

Reviewed-by: chegar, psandoz
This commit is contained in:
Amy Lu 2017-04-14 15:30:39 +08:00
parent 9ba92f656c
commit 780a27b3b1
2 changed files with 3 additions and 26 deletions
jdk/test

@ -255,9 +255,6 @@ tools/jimage/JImageExtractTest.java 8170120 generic-
tools/jimage/JImageListTest.java 8170120 generic-all
tools/jimage/JImageVerifyTest.java 8170120 generic-all
tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java 8169971 windows-x64
############################################################################
# jdk_jdi

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -26,16 +26,15 @@
* @bug 8156499
* @summary Test image creation from Multi-Release JAR
* @author Steve Drach
* @library /lib/testlibrary /test/lib
* @library /test/lib
* @modules java.base/jdk.internal.jimage
* java.base/jdk.internal.module
* @build jdk.testlibrary.FileUtils jdk.test.lib.process.*
* @build jdk.test.lib.process.*
* @run testng JLinkMultiReleaseJarTest
*/
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
@ -54,10 +53,8 @@ import java.util.stream.Stream;
import jdk.internal.jimage.BasicImageReader;
import jdk.test.lib.process.ProcessTools;
import jdk.test.lib.process.OutputAnalyzer;
import jdk.testlibrary.FileUtils;
import org.testng.Assert;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@ -138,23 +135,6 @@ public class JLinkMultiReleaseJarTest {
Assert.assertEquals(rc, 0);
}
@AfterClass
public void close() throws IOException {
Files.walk(userdir, 1)
.filter(p -> !p.equals(userdir))
.forEach(p -> {
try {
if (Files.isDirectory(p)) {
FileUtils.deleteFileTreeWithRetry(p);
} else {
FileUtils.deleteFileIfExistsWithRetry(p);
}
} catch (IOException x) {
throw new UncheckedIOException(x);
}
});
}
@Test
public void basicTest() throws Throwable {
if (ignoreTest()) return;