131 |
|
System.out.printf("%n%s: %d%n", toString(), elapsedMillis); |
132 |
|
} |
133 |
|
} |
134 |
< |
|
134 |
> |
|
135 |
|
/** |
136 |
|
* Runs all JSR166 unit tests using junit.textui.TestRunner |
137 |
|
*/ |
746 |
|
|
747 |
|
public Callable<String> latchAwaitingStringTask(final CountDownLatch latch) { |
748 |
|
return new CheckedCallable<String>() { |
749 |
< |
public String realCall() { |
749 |
> |
protected String realCall() { |
750 |
|
try { |
751 |
|
latch.await(); |
752 |
|
} catch (InterruptedException quittingTime) {} |
807 |
|
} |
808 |
|
} |
809 |
|
|
810 |
+ |
public Runnable possiblyInterruptedRunnable(final long timeoutMillis) { |
811 |
+ |
return new CheckedRunnable() { |
812 |
+ |
protected void realRun() { |
813 |
+ |
try { |
814 |
+ |
Thread.sleep(timeoutMillis); |
815 |
+ |
} catch (InterruptedException ok) {} |
816 |
+ |
}}; |
817 |
+ |
} |
818 |
+ |
|
819 |
|
public class MediumPossiblyInterruptedRunnable extends CheckedRunnable { |
820 |
|
protected void realRun() { |
821 |
|
try { |