8255011: [TESTBUG] compiler/codecache/stress/UnexpectedDeoptimizationAllTest.java timed out
Change CodeCacheStressRunner to have a 60 second test time Reviewed-by: iignatyev
This commit is contained in:
parent
c601849e00
commit
e281b13597
@ -28,6 +28,7 @@ import jdk.test.lib.Utils;
|
||||
|
||||
public class CodeCacheStressRunner {
|
||||
private final Runnable action;
|
||||
|
||||
public CodeCacheStressRunner(Runnable action) {
|
||||
this.action = action;
|
||||
}
|
||||
@ -35,10 +36,8 @@ public class CodeCacheStressRunner {
|
||||
protected final void runTest() {
|
||||
Helper.startInfiniteLoopThread(action);
|
||||
try {
|
||||
// adjust timeout and substract vm init and exit time
|
||||
long timeout = Utils.adjustTimeout(Utils.DEFAULT_TEST_TIMEOUT);
|
||||
timeout *= 0.8;
|
||||
new TimeLimitedRunner(timeout, 2.0d, this::test).call();
|
||||
// Adjust timeout and substract vm init and exit time
|
||||
new TimeLimitedRunner(60 * 1000, 2.0d, this::test).call();
|
||||
} catch (Exception e) {
|
||||
throw new Error("Exception occurred during test execution", e);
|
||||
}
|
||||
|
@ -60,6 +60,13 @@ public class UnexpectedDeoptimizationTest implements Runnable {
|
||||
@Override
|
||||
public void run() {
|
||||
Helper.WHITE_BOX.deoptimizeFrames(rng.nextBoolean());
|
||||
// Sleep a short while to allow the stacks to grow - otherwise
|
||||
// we end up running almost all code in the interpreter
|
||||
try {
|
||||
Thread.sleep(10);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user