Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
MBaesken committed Jan 29, 2025
1 parent 168f656 commit bc6717d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/jdk/sun/tools/jhsdb/JShellHeapDumpTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public class JShellHeapDumpTest {
static Process jShellProcess;
static boolean doSleep = true; // By default do a short sleep when app starts up

// Returns false if the attempt should be retried.
public static boolean launch(String expectedMessage, List<String> toolArgs, boolean allowRetry)
throws IOException {

Expand Down Expand Up @@ -102,6 +103,8 @@ public static void launch(String expectedMessage, String... toolArgs)
throws IOException {

boolean res = launch(expectedMessage, Arrays.asList(toolArgs), true);
// Allow a retry for !doSleep, because the sleep allows the debuggee to stabilize,
// making it very unlikely that jmap will fail.
if (!res && !doSleep) {
launch(expectedMessage, Arrays.asList(toolArgs), false);
}
Expand Down

0 comments on commit bc6717d

Please sign in to comment.