jdk/test/java/util/concurrent/locks/LockSupport/ParkLoops.java
changeset 36956 f4ba8a865e4b
parent 36233 f85ed703cf7e
child 38551 82c48058acc2
--- a/jdk/test/java/util/concurrent/locks/LockSupport/ParkLoops.java	Thu Apr 07 10:01:36 2016 -0700
+++ b/jdk/test/java/util/concurrent/locks/LockSupport/ParkLoops.java	Thu Apr 07 10:06:01 2016 -0700
@@ -37,9 +37,11 @@
  * @summary Stress test looks for lost unparks
  * @library /lib/testlibrary/
  * @modules java.management
+ * @run main/timeout=1200 ParkLoops
  */
 
 import static java.util.concurrent.TimeUnit.MILLISECONDS;
+import static java.util.concurrent.TimeUnit.SECONDS;
 
 import java.lang.management.ManagementFactory;
 import java.lang.management.ThreadInfo;
@@ -53,6 +55,7 @@
 import jdk.testlibrary.Utils;
 
 public final class ParkLoops {
+    static final long TEST_TIMEOUT_SECONDS = Utils.adjustTimeout(1000);
     static final long LONG_DELAY_MS = Utils.adjustTimeout(10_000);
     static final int THREADS = 4;
     static final int ITERS = 30_000;
@@ -130,7 +133,7 @@
             pool.submit(unparker);
         }
         try {
-          if (!done.await(LONG_DELAY_MS, MILLISECONDS)) {
+          if (!done.await(TEST_TIMEOUT_SECONDS, SECONDS)) {
             dumpAllStacks();
             throw new AssertionError("lost unpark");
           }