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.185 by jsr166, Mon Feb 22 19:36:59 2016 UTC vs.
Revision 1.188 by jsr166, Mon Feb 22 23:16:06 2016 UTC

# Line 202 | Line 202 | public class JSR166TestCase extends Test
202       */
203      private static final float delayFactor =
204          systemPropertyValue("jsr166.delay.factor", 1.0f);
205 <    
205 >
206      /**
207       * The timeout factor as used in the jtreg test harness.
208       * See: http://openjdk.java.net/jtreg/tag-spec.html
# Line 585 | Line 585 | public class JSR166TestCase extends Test
585      /**
586       * Returns the shortest timed delay. This can be scaled up for
587       * slow machines using the jsr166.delay.factor system property,
588 <     * or via jtreg's -timeoutFactor:<val> flag.
588 >     * or via jtreg's -timeoutFactor: flag.
589       * http://openjdk.java.net/jtreg/command-help.html
590       */
591      protected long getShortDelay() {
# Line 1466 | Line 1466 | public class JSR166TestCase extends Test
1466          return new LatchAwaiter(latch);
1467      }
1468  
1469 <    public void await(CountDownLatch latch) {
1469 >    public void await(CountDownLatch latch, long timeoutMillis) {
1470          try {
1471 <            if (!latch.await(LONG_DELAY_MS, MILLISECONDS))
1471 >            if (!latch.await(timeoutMillis, MILLISECONDS))
1472                  fail("timed out waiting for CountDownLatch for "
1473 <                     + (LONG_DELAY_MS/1000) + " sec");
1473 >                     + (timeoutMillis/1000) + " sec");
1474          } catch (Throwable fail) {
1475              threadUnexpectedException(fail);
1476          }
1477      }
1478  
1479 +    public void await(CountDownLatch latch) {
1480 +        await(latch, LONG_DELAY_MS);
1481 +    }
1482 +
1483      public void await(Semaphore semaphore) {
1484          try {
1485              if (!semaphore.tryAcquire(LONG_DELAY_MS, MILLISECONDS))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines