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.74 by jsr166, Tue Mar 15 19:47:06 2011 UTC vs.
Revision 1.75 by jsr166, Tue May 3 06:08:49 2011 UTC

# Line 631 | Line 631 | public class JSR166TestCase extends Test
631      }
632  
633      /**
634 +     * Waits up to LONG_DELAY_MS for the given thread to enter a wait
635 +     * state: BLOCKED, WAITING, or TIMED_WAITING.
636 +     */
637 +    void waitForThreadToEnterWaitState(Thread thread) {
638 +        waitForThreadToEnterWaitState(thread, LONG_DELAY_MS);
639 +    }
640 +
641 +    /**
642       * Returns the number of milliseconds since time given by
643       * startNanoTime, which must have been previously returned from a
644       * call to {@link System.nanoTime()}.
# Line 667 | Line 675 | public class JSR166TestCase extends Test
675          }
676      }
677  
678 +    /**
679 +     * Waits for LONG_DELAY_MS milliseconds for the thread to
680 +     * terminate (using {@link Thread#join(long)}), else interrupts
681 +     * the thread (in the hope that it may terminate later) and fails.
682 +     */
683 +    void awaitTermination(Thread t) {
684 +        awaitTermination(t, LONG_DELAY_MS);
685 +    }
686 +
687      // Some convenient Runnable classes
688  
689      public abstract class CheckedRunnable implements Runnable {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines