181 |
|
public void testInterruptedSubmit() throws InterruptedException { |
182 |
|
final CountDownLatch submitted = new CountDownLatch(1); |
183 |
|
final CountDownLatch quittingTime = new CountDownLatch(1); |
184 |
< |
final Callable<Void> awaiter = new CheckedCallable<Void>() { |
184 |
> |
final Callable<Void> awaiter = new CheckedCallable<>() { |
185 |
|
public Void realCall() throws InterruptedException { |
186 |
|
assertTrue(quittingTime.await(2*LONG_DELAY_MS, MILLISECONDS)); |
187 |
|
return null; |
213 |
|
60, TimeUnit.SECONDS, |
214 |
|
new ArrayBlockingQueue<Runnable>(10)); |
215 |
|
try (PoolCleaner cleaner = cleaner(p)) { |
216 |
< |
Callable<Object> c = new Callable<Object>() { |
216 |
> |
Callable<Object> c = new Callable<>() { |
217 |
|
public Object call() { throw new ArithmeticException(); }}; |
218 |
|
try { |
219 |
|
p.submit(c).get(); |