406 |
|
try { |
407 |
|
p.execute(new CheckedRunnable() { |
408 |
|
public void realRun() throws InterruptedException { |
409 |
– |
threadStarted.countDown(); |
409 |
|
assertFalse(p.isTerminated()); |
410 |
+ |
threadStarted.countDown(); |
411 |
|
done.await(); |
412 |
|
}}); |
413 |
|
assertTrue(threadStarted.await(SMALL_DELAY_MS, MILLISECONDS)); |
414 |
+ |
assertFalse(p.isTerminating()); |
415 |
|
done.countDown(); |
416 |
|
} finally { |
417 |
|
try { p.shutdown(); } catch (SecurityException ok) { return; } |
434 |
|
assertFalse(p.isTerminating()); |
435 |
|
p.execute(new CheckedRunnable() { |
436 |
|
public void realRun() throws InterruptedException { |
436 |
– |
threadStarted.countDown(); |
437 |
|
assertFalse(p.isTerminating()); |
438 |
+ |
threadStarted.countDown(); |
439 |
|
done.await(); |
440 |
|
}}); |
441 |
|
assertTrue(threadStarted.await(SMALL_DELAY_MS, MILLISECONDS)); |