# HG changeset patch # User pchistyakov # Date 1422288110 -10800 # Node ID 0b2795366c28e7bd3f1b4de793b0da4da45b7e16 # Parent 3e314e9c40f1b6dc3f7dae79fe9ec9d06ab2a5f8 8069125: compiler/codecache/stress tests timeout in nightlies Summary: added timeout between one of test threads iterations, adjusted hole test execution time Reviewed-by: kvn diff -r 3e314e9c40f1 -r 0b2795366c28 hotspot/test/compiler/codecache/stress/CodeCacheStressRunner.java --- a/hotspot/test/compiler/codecache/stress/CodeCacheStressRunner.java Mon Jan 26 18:59:09 2015 +0300 +++ b/hotspot/test/compiler/codecache/stress/CodeCacheStressRunner.java Mon Jan 26 19:01:50 2015 +0300 @@ -36,7 +36,7 @@ try { // adjust timeout and substract vm init and exit time long timeout = Utils.adjustTimeout(Utils.DEFAULT_TEST_TIMEOUT); - timeout *= 0.9; + timeout *= 0.8; new TimeLimitedRunner(timeout, 2.0d, this::test).call(); } catch (Exception e) { throw new Error("Exception occurred during test execution", e); diff -r 3e314e9c40f1 -r 0b2795366c28 hotspot/test/compiler/codecache/stress/OverloadCompileQueueTest.java --- a/hotspot/test/compiler/codecache/stress/OverloadCompileQueueTest.java Mon Jan 26 18:59:09 2015 +0300 +++ b/hotspot/test/compiler/codecache/stress/OverloadCompileQueueTest.java Mon Jan 26 19:01:50 2015 +0300 @@ -77,7 +77,7 @@ } public OverloadCompileQueueTest() { - Helper.startInfiniteLoopThread(this::lockUnlock); + Helper.startInfiniteLoopThread(this::lockUnlock, 100L); } @Override @@ -99,8 +99,9 @@ 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 {