6 |
|
* Pat Fisher, Mike Judd. |
7 |
|
*/ |
8 |
|
|
9 |
+ |
import junit.framework.*; |
10 |
|
import java.util.concurrent.*; |
11 |
|
import static java.util.concurrent.TimeUnit.MILLISECONDS; |
12 |
< |
import java.util.concurrent.locks.*; |
13 |
< |
|
13 |
< |
import junit.framework.*; |
12 |
> |
import java.util.concurrent.locks.Condition; |
13 |
> |
import java.util.concurrent.locks.ReentrantLock; |
14 |
|
import java.util.*; |
15 |
|
|
16 |
|
public class ThreadPoolExecutorSubclassTest extends JSR166TestCase { |
1248 |
|
CustomTPE p = new CustomTPE(); |
1249 |
|
try { |
1250 |
|
final CountDownLatch done = new CountDownLatch(1); |
1251 |
< |
final CheckedRunnable task = new CheckedRunnable() { |
1251 |
> |
p.execute(new CheckedRunnable() { |
1252 |
|
public void realRun() { |
1253 |
|
done.countDown(); |
1254 |
< |
}}; |
1255 |
< |
p.execute(task); |
1254 |
> |
}}); |
1255 |
|
await(p.afterCalled); |
1256 |
|
assertEquals(0, done.getCount()); |
1257 |
|
assertTrue(p.afterCalled()); |