8169971: JLinkMultiReleaseJarTest.java fails intermittently at the final clean up
authoramlu
Fri, 14 Apr 2017 15:30:39 +0800
changeset 44669 1f2cfb3b2d3c
parent 44668 1197afaf020a
child 44670 77e54dd0675f
8169971: JLinkMultiReleaseJarTest.java fails intermittently at the final clean up Reviewed-by: chegar, psandoz
jdk/test/ProblemList.txt
jdk/test/tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java
--- a/jdk/test/ProblemList.txt	Thu Apr 13 11:16:25 2017 -0700
+++ b/jdk/test/ProblemList.txt	Fri Apr 14 15:30:39 2017 +0800
@@ -255,9 +255,6 @@
 tools/jimage/JImageListTest.java                                8170120 generic-all
 tools/jimage/JImageVerifyTest.java                              8170120 generic-all
 
-
-tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java       8169971 windows-x64
-
 ############################################################################
 
 # jdk_jdi
--- a/jdk/test/tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java	Thu Apr 13 11:16:25 2017 -0700
+++ b/jdk/test/tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java	Fri Apr 14 15:30:39 2017 +0800
@@ -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 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 @@
         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;