1 |
|
/* |
2 |
< |
* Written by members of JCP JSR-166 Expert Group and released to the |
3 |
< |
* public domain. Use, modify, and redistribute this code in any way |
4 |
< |
* without acknowledgement. Other contributors include Andrew Wright, |
5 |
< |
* Jeffrey Hayes, Pat Fischer, Mike Judd. |
2 |
> |
* Written by Doug Lea with assistance from members of JCP JSR-166 |
3 |
> |
* Expert Group and released to the public domain, as explained at |
4 |
> |
* http://creativecommons.org/licenses/publicdomain |
5 |
> |
* Other contributors include Andrew Wright, Jeffrey Hayes, |
6 |
> |
* Pat Fisher, Mike Judd. |
7 |
|
*/ |
8 |
|
|
9 |
|
import junit.framework.*; |
100 |
|
TestSuite suite = new TestSuite("JSR166 Unit Tests"); |
101 |
|
|
102 |
|
suite.addTest(new TestSuite(AbstractExecutorServiceTest.class)); |
103 |
+ |
suite.addTest(new TestSuite(AbstractQueuedSynchronizerTest.class)); |
104 |
|
suite.addTest(new TestSuite(ArrayBlockingQueueTest.class)); |
105 |
|
suite.addTest(new TestSuite(AtomicBooleanTest.class)); |
106 |
|
suite.addTest(new TestSuite(AtomicIntegerArrayTest.class)); |
123 |
|
suite.addTest(new TestSuite(DelayQueueTest.class)); |
124 |
|
suite.addTest(new TestSuite(ExchangerTest.class)); |
125 |
|
suite.addTest(new TestSuite(ExecutorsTest.class)); |
126 |
+ |
suite.addTest(new TestSuite(ExecutorCompletionServiceTest.class)); |
127 |
|
suite.addTest(new TestSuite(FutureTaskTest.class)); |
128 |
|
suite.addTest(new TestSuite(LinkedBlockingQueueTest.class)); |
129 |
|
suite.addTest(new TestSuite(LinkedListTest.class)); |
153 |
|
|
154 |
|
/** |
155 |
|
* Return the shortest timed delay. This could |
156 |
< |
* be reimplmented to use for example a Property. |
156 |
> |
* be reimplemented to use for example a Property. |
157 |
|
*/ |
158 |
|
protected long getShortDelay() { |
159 |
|
return 100; |
468 |
|
} |
469 |
|
} |
470 |
|
|
471 |
+ |
class LongPossiblyInterruptedRunnable implements Runnable { |
472 |
+ |
public void run() { |
473 |
+ |
try { |
474 |
+ |
Thread.sleep(LONG_DELAY_MS); |
475 |
+ |
} |
476 |
+ |
catch(InterruptedException success) { |
477 |
+ |
} |
478 |
+ |
} |
479 |
+ |
} |
480 |
+ |
|
481 |
|
/** |
482 |
|
* For use as ThreadFactory in constructors |
483 |
|
*/ |
539 |
|
} |
540 |
|
} |
541 |
|
|
542 |
+ |
|
543 |
|
/** |
544 |
|
* For use as RejectedExecutionHandler in constructors |
545 |
|
*/ |