261 |
|
} |
262 |
|
|
263 |
|
/** |
264 |
< |
* quietelyInvoke task returns when task completes abnormally |
264 |
> |
* quietlyInvoke task returns when task completes abnormally |
265 |
|
*/ |
266 |
|
public void testAbnormalQuietlyInvoke() { |
267 |
|
RecursiveTask<Integer> a = new RecursiveTask<Integer>() { |
307 |
|
Integer r = f.get(); |
308 |
|
shouldThrow(); |
309 |
|
return r; |
310 |
< |
} catch (Exception success) { |
310 |
> |
} catch (ExecutionException success) { |
311 |
> |
} catch (Exception ex) { |
312 |
> |
unexpectedException(ex); |
313 |
|
} |
314 |
|
return NoResult; |
315 |
|
} |
329 |
|
Integer r = f.get(5L, TimeUnit.SECONDS); |
330 |
|
shouldThrow(); |
331 |
|
return r; |
332 |
< |
} catch (Exception success) { |
332 |
> |
} catch (ExecutionException success) { |
333 |
> |
} catch (Exception ex) { |
334 |
> |
unexpectedException(ex); |
335 |
|
} |
336 |
|
return NoResult; |
337 |
|
} |
453 |
|
Integer r = f.get(); |
454 |
|
shouldThrow(); |
455 |
|
return r; |
456 |
< |
} catch (Exception success) { |
456 |
> |
} catch (CancellationException success) { |
457 |
> |
} catch (Exception ex) { |
458 |
> |
unexpectedException(ex); |
459 |
|
} |
460 |
|
return NoResult; |
461 |
|
} |
476 |
|
Integer r = f.get(5L, TimeUnit.SECONDS); |
477 |
|
shouldThrow(); |
478 |
|
return r; |
479 |
< |
} catch (Exception success) { |
479 |
> |
} catch (CancellationException success) { |
480 |
> |
} catch (Exception ex) { |
481 |
> |
unexpectedException(ex); |
482 |
|
} |
483 |
|
return NoResult; |
484 |
|
} |
817 |
|
} |
818 |
|
|
819 |
|
/** |
820 |
< |
* invokeAll(collection) throws exception if any task does |
820 |
> |
* invokeAll(collection) throws exception if any task does |
821 |
|
*/ |
822 |
|
public void testAbnormalInvokeAllCollection() { |
823 |
|
RecursiveTask<Integer> a = new RecursiveTask<Integer>() { |