535 |
|
try { |
536 |
|
p.execute(new CheckedRunnable() { |
537 |
|
public void realRun() throws InterruptedException { |
538 |
– |
threadStarted.countDown(); |
538 |
|
assertFalse(p.isTerminated()); |
539 |
+ |
threadStarted.countDown(); |
540 |
|
done.await(); |
541 |
|
}}); |
542 |
|
assertTrue(threadStarted.await(SMALL_DELAY_MS, MILLISECONDS)); |
543 |
+ |
assertFalse(p.isTerminating()); |
544 |
|
done.countDown(); |
545 |
|
} finally { |
546 |
|
try { p.shutdown(); } catch (SecurityException ok) { return; } |
560 |
|
assertFalse(p.isTerminating()); |
561 |
|
p.execute(new CheckedRunnable() { |
562 |
|
public void realRun() throws InterruptedException { |
562 |
– |
threadStarted.countDown(); |
563 |
|
assertFalse(p.isTerminating()); |
564 |
+ |
threadStarted.countDown(); |
565 |
|
done.await(); |
566 |
|
}}); |
567 |
|
assertTrue(threadStarted.await(SMALL_DELAY_MS, MILLISECONDS)); |