Review Request JDK-8222448: java/lang/reflect/PublicMethods/PublicMethodsTest.java times out

Mandy Chung mandy.chung at oracle.com
Tue Jun 4 03:02:47 UTC 2019


test/jdk/java/lang/reflect/PublicMethods/PublicMethodsTest.java time out
in certain configuration e.g. fastdebug -Xcomp.  Setting the empty class
path significantly improves the execution time as it eliminates opening
and scanning of the JAR files on the class path.  Alan has also experimented
it on Windows machine.

diff --git 
a/test/jdk/java/lang/reflect/PublicMethods/PublicMethodsTest.java 
b/test/jdk/java/lang/reflect/PublicMethods/PublicMethodsTest.java
--- a/test/jdk/java/lang/reflect/PublicMethods/PublicMethodsTest.java
+++ b/test/jdk/java/lang/reflect/PublicMethods/PublicMethodsTest.java
@@ -222,6 +222,11 @@
          StandardJavaFileManager standardJavaFileManager =
              javac.getStandardFileManager(errorsCollector, Locale.ROOT,
Charset.forName("UTF-8"));
+        try {
+ standardJavaFileManager.setLocation(StandardLocation.CLASS_PATH, 
List.of());
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
          TestFileManager testFileManager = new TestFileManager(
              standardJavaFileManager, source);


Mandy


More information about the core-libs-dev mailing list