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.268 by jsr166, Sun Sep 22 01:59:57 2019 UTC vs.
Revision 1.270 by jsr166, Sun Sep 29 20:18:35 2019 UTC

# Line 704 | Line 704 | public class JSR166TestCase extends Test
704      /**
705       * Returns a random element from given choices.
706       */
707 +    <T> T chooseRandomly(List<T> choices) {
708 +        return choices.get(ThreadLocalRandom.current().nextInt(choices.size()));
709 +    }
710 +
711 +    /**
712 +     * Returns a random element from given choices.
713 +     */
714      <T> T chooseRandomly(T... choices) {
715          return choices[ThreadLocalRandom.current().nextInt(choices.length)];
716      }
# Line 1477 | Line 1484 | public class JSR166TestCase extends Test
1484       * wrapped in a CheckedRunnable.
1485       */
1486      Thread newStartedThread(Action action) {
1487 <        return newStartedThread(checkedRunnable(action));
1487 >        return newStartedThread(checkedRunnable(action));
1488      }
1489  
1490      /**
# Line 1772 | Line 1779 | public class JSR166TestCase extends Test
1779  
1780          public int await() {
1781              try {
1782 <                return super.await(2 * LONG_DELAY_MS, MILLISECONDS);
1782 >                return super.await(LONGER_DELAY_MS, MILLISECONDS);
1783              } catch (TimeoutException timedOut) {
1784                  throw new AssertionError("timed out");
1785              } catch (Exception fail) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines