Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8298073: gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java causes …
…test task timeout on macosx

8241293: CompressedClassSpaceSizeInJmapHeap.java time out after 8 minutes

Reviewed-by: phh
Backport-of: 99a6c47855ad82e81a80726cf3aa4522c547716d
  • Loading branch information
GoeLin committed Feb 8, 2023
1 parent 9d7bb60 commit b88cd77
Showing 1 changed file with 8 additions and 3 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2022, 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
Expand Down Expand Up @@ -32,11 +32,12 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:CompressedClassSpaceSize=50m gc.metaspace.CompressedClassSpaceSizeInJmapHeap
* @run main/timeout=240 gc.metaspace.CompressedClassSpaceSizeInJmapHeap
*/

import jdk.test.lib.JDKToolLauncher;
import jdk.test.lib.Platform;
import jdk.test.lib.apps.LingeredApp;
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
import jdk.test.lib.SA.SATestUtils;
Expand All @@ -55,7 +56,9 @@ public static void main(String[] args) throws Exception {
return;
}

String pid = Long.toString(ProcessTools.getProcessId());
LingeredApp theApp = new LingeredApp();
LingeredApp.startApp(List.of("-XX:CompressedClassSpaceSize=50m"), theApp);
String pid = Long.toString(theApp.getPid());

JDKToolLauncher jmap = JDKToolLauncher.create("jhsdb")
.addToolArg("jmap")
Expand All @@ -75,6 +78,8 @@ public static void main(String[] args) throws Exception {
OutputAnalyzer output = new OutputAnalyzer(read(out));
output.shouldContain("CompressedClassSpaceSize = 52428800 (50.0MB)");
out.delete();

LingeredApp.stopApp(theApp);
}

private static void run(ProcessBuilder pb) throws Exception {
Expand Down

1 comment on commit b88cd77

@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.