8069125: compiler/codecache/stress tests timeout in nightlies
authorpchistyakov
Mon, 26 Jan 2015 19:01:50 +0300
changeset 28728 0b2795366c28
parent 28727 3e314e9c40f1
child 28729 062f02fa1d17
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
hotspot/test/compiler/codecache/stress/CodeCacheStressRunner.java
hotspot/test/compiler/codecache/stress/OverloadCompileQueueTest.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);
--- 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 {