8066896: Update c.o.j.t.InfiniteLoop to skip zero timeout
authoriignatyev
Tue, 23 Dec 2014 16:36:44 +0300
changeset 28386 06892f6d6d72
parent 28385 bec02e2cbde7
child 28387 ca7473b3239c
8066896: Update c.o.j.t.InfiniteLoop to skip zero timeout Reviewed-by: kvn, iignatyev Contributed-by: pavel.chistyakov@oracle.com
hotspot/test/testlibrary/com/oracle/java/testlibrary/InfiniteLoop.java
--- a/hotspot/test/testlibrary/com/oracle/java/testlibrary/InfiniteLoop.java	Fri Dec 19 14:12:22 2014 +0300
+++ b/hotspot/test/testlibrary/com/oracle/java/testlibrary/InfiniteLoop.java	Tue Dec 23 16:36:44 2014 +0300
@@ -54,7 +54,9 @@
         try {
             while (true) {
                 target.run();
-                Thread.sleep(mills);
+                if (mills > 0) {
+                    Thread.sleep(mills);
+                }
             }
         } catch (InterruptedException e) {
             Thread.currentThread().interrupt();