Skip to content

Commit

Permalink
8307653: Adjust delay time and gc log argument in TestAbortOnVMOperat…
Browse files Browse the repository at this point in the history
…ionTimeout

Backport-of: 4f355c3525072681ed1fb48dfdb8924b1cf0cc7c
  • Loading branch information
GoeLin committed Jul 20, 2023
1 parent b640436 commit b5f27f9
Showing 1 changed file with 5 additions and 7 deletions.
Expand Up @@ -26,7 +26,7 @@

/*
* @test TestAbortOnVMOperationTimeout
* @bug 8181143 8269523
* @bug 8181143 8269523 8307653
* @summary Check abort on VM timeout is working
* @library /test/lib
* @modules java.base/jdk.internal.misc
Expand All @@ -50,11 +50,9 @@ public static void main(String[] args) throws Exception {
return;
}

// These should definitely pass: more than a minute is enough for Serial to act.
// The values are deliberately non-round to trip off periodic task granularity.
for (int delay : new int[]{63423, 12388131}) {
testWith(delay, true);
}
// This should definitely pass: more than 3 minutes is enough for Serial to act.
// The value is deliberately non-round to trip off periodic task granularity.
testWith(183423, true);

// These should fail: Serial is not very fast but we have seen the test
// execute as quickly as 2ms!
Expand All @@ -71,7 +69,7 @@ public static void testWith(int delay, boolean shouldPass) throws Exception {
"-Xmx256m",
"-XX:+UseSerialGC",
"-XX:-CreateCoredumpOnCrash",
"-Xlog:gc",
"-Xlog:gc*=info",
"TestAbortOnVMOperationTimeout",
"foo"
);
Expand Down

1 comment on commit b5f27f9

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