8069125: compiler/codecache/stress tests timeout in nightlies

Added timeout between one of test threads iterations, adjusted hole test execution time

Reviewed-by: kvn
This commit is contained in:
Pavel Chistyakov 2015-01-26 19:01:50 +03:00
parent 28c5919585
commit fb6e6379b0
2 changed files with 4 additions and 3 deletions

View file

@ -77,7 +77,7 @@ public class OverloadCompileQueueTest implements Runnable {
}
public OverloadCompileQueueTest() {
Helper.startInfiniteLoopThread(this::lockUnlock);
Helper.startInfiniteLoopThread(this::lockUnlock, 100L);
}
@Override
@ -99,8 +99,9 @@ public class OverloadCompileQueueTest implements Runnable {
private void lockUnlock() {
try {
int sleep = Helper.RNG.nextInt(MAX_SLEEP);
Helper.WHITE_BOX.lockCompilation();
Thread.sleep(Helper.RNG.nextInt(MAX_SLEEP));
Thread.sleep(sleep);
} catch (InterruptedException e) {
throw new Error("TESTBUG: lockUnlocker thread was unexpectedly interrupted", e);
} finally {