7 |
|
*/ |
8 |
|
|
9 |
|
import junit.framework.*; |
10 |
– |
import java.security.Permission; |
10 |
|
import java.util.concurrent.Callable; |
11 |
|
import java.util.concurrent.CancellationException; |
12 |
|
import java.util.concurrent.CountDownLatch; |
461 |
|
try { |
462 |
|
pleaseCancel.countDown(); |
463 |
|
delay(LONG_DELAY_MS); |
464 |
< |
} finally { throw new RuntimeException(); } |
464 |
> |
shouldThrow(); |
465 |
> |
} catch (Throwable t) { |
466 |
> |
assertTrue(t instanceof InterruptedException); |
467 |
> |
} |
468 |
> |
throw new RuntimeException(); |
469 |
|
}}); |
470 |
|
|
471 |
|
Thread t = newStartedThread(task); |