Skip to content

Commit

Permalink
8292315: Tests should not rely on specific JAR file names (hotspot)
Browse files Browse the repository at this point in the history
Reviewed-by: phh
Backport-of: 62a7fc60d3b3a27525fc01930834dab6f89bd451
  • Loading branch information
GoeLin committed Jun 19, 2023
1 parent f21f9a4 commit 9dd23ff
Showing 1 changed file with 2 additions and 9 deletions.
Expand Up @@ -37,6 +37,7 @@

import org.testng.annotations.Test;
import java.io.File;
import java.nio.file.Path;
import jtreg.SkippedException;
import sun.hotspot.gc.GC;

Expand All @@ -49,22 +50,14 @@ public void testMain() throws Exception {

private static final String classDir = System.getProperty("test.classes");
private static final String mainClass = "TestStreamApp";
private static final String javaClassPath = System.getProperty("java.class.path");
private static final String ps = System.getProperty("path.separator");
private static final String skippedException = "jtreg.SkippedException: Unable to map shared archive: test did not complete";

static void doTest() throws Exception {
String topArchiveName = getNewArchiveName();
String appJar = JarBuilder.build("streamapp", new File(classDir), null);

String[] classPaths = javaClassPath.split(File.pathSeparator);
String testngJar = null;
for (String path : classPaths) {
if (path.endsWith("testng.jar")) {
testngJar = path;
break;
}
}
String testngJar = Path.of(Test.class.getProtectionDomain().getCodeSource().getLocation().toURI()).toString();

String[] testClassNames = { "CustomFJPoolTest" };

Expand Down

1 comment on commit 9dd23ff

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.