8152005: sun/misc/SunMiscSignalTest.java failed intermittently
authorrriggs
Wed, 30 Mar 2016 12:47:54 -0400
changeset 36740 f80cd68bc7f4
parent 36739 145210aba850
child 36741 aaf41d8104ce
8152005: sun/misc/SunMiscSignalTest.java failed intermittently Summary: extend timeout and retry Reviewed-by: darcy
jdk/test/sun/misc/SunMiscSignalTest.java
--- a/jdk/test/sun/misc/SunMiscSignalTest.java	Tue Mar 29 17:06:33 2016 -0700
+++ b/jdk/test/sun/misc/SunMiscSignalTest.java	Wed Mar 30 12:47:54 2016 -0400
@@ -330,6 +330,12 @@
         Signal.raise(signal);
         boolean handled = handler.semaphore()
                 .tryAcquire(Utils.adjustTimeout(100L), TimeUnit.MILLISECONDS);
+        if (!handled) {
+            // For debug try again
+            printf("Second try to see signal");
+            handled = handler.semaphore()
+                    .tryAcquire(Utils.adjustTimeout(2L), TimeUnit.SECONDS);
+        }
         Assert.assertEquals(handled, !RUNNING_WITH_Xrs,
                 "raising s.m.Signal did not get a callback;");