ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/JSR166TestCase.java
(Generate patch)

Comparing jsr166/src/test/tck/JSR166TestCase.java (file contents):
Revision 1.224 by jsr166, Sat May 13 21:43:50 2017 UTC vs.
Revision 1.226 by jsr166, Sun May 14 00:37:42 2017 UTC

# Line 1068 | Line 1068 | public class JSR166TestCase extends Test
1068      void assertThreadBlocks(Thread thread, Thread.State expected) {
1069          // always sleep at least 1 ms, avoiding transitional states
1070          // with high probability
1071 <        for (long retries = LONG_DELAY_MS; retries-->0; ) {
1071 >        for (long retries = LONG_DELAY_MS * 3 / 4; retries-->0; ) {
1072              try { delay(1); }
1073              catch (InterruptedException fail) {
1074                  fail("Unexpected InterruptedException");
# Line 1635 | Line 1635 | public class JSR166TestCase extends Test
1635          } catch (Throwable fail) {
1636              threadUnexpectedException(fail);
1637          }
1638 +    }
1639 +
1640 +    public void await(CyclicBarrier barrier) {
1641 +        try {
1642 +            barrier.await(LONG_DELAY_MS, MILLISECONDS);
1643 +        } catch (Throwable fail) {
1644 +            threadUnexpectedException(fail);
1645 +        }
1646      }
1647  
1648   //     /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines