Skip to content

Commit e281b13

Browse files
author
Nils Eliasson
committed
8255011: [TESTBUG] compiler/codecache/stress/UnexpectedDeoptimizationAllTest.java timed out
Change CodeCacheStressRunner to have a 60 second test time Reviewed-by: iignatyev
1 parent c601849 commit e281b13

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

test/hotspot/jtreg/compiler/codecache/stress/CodeCacheStressRunner.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,16 @@
2828

2929
public class CodeCacheStressRunner {
3030
private final Runnable action;
31+
3132
public CodeCacheStressRunner(Runnable action) {
3233
this.action = action;
3334
}
3435

3536
protected final void runTest() {
3637
Helper.startInfiniteLoopThread(action);
3738
try {
38-
// adjust timeout and substract vm init and exit time
39-
long timeout = Utils.adjustTimeout(Utils.DEFAULT_TEST_TIMEOUT);
40-
timeout *= 0.8;
41-
new TimeLimitedRunner(timeout, 2.0d, this::test).call();
39+
// Adjust timeout and substract vm init and exit time
40+
new TimeLimitedRunner(60 * 1000, 2.0d, this::test).call();
4241
} catch (Exception e) {
4342
throw new Error("Exception occurred during test execution", e);
4443
}

test/hotspot/jtreg/compiler/codecache/stress/UnexpectedDeoptimizationTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ public static void main(String[] args) {
6060
@Override
6161
public void run() {
6262
Helper.WHITE_BOX.deoptimizeFrames(rng.nextBoolean());
63+
// Sleep a short while to allow the stacks to grow - otherwise
64+
// we end up running almost all code in the interpreter
65+
try {
66+
Thread.sleep(10);
67+
} catch (Exception e) {
68+
}
69+
6370
}
6471

6572
}

0 commit comments

Comments
 (0)