214 |
|
shouldThrow(); |
215 |
|
} catch (NullPointerException success) {} |
216 |
|
} |
217 |
+ |
|
218 |
|
/** |
219 |
|
* addAll of a collection with any null elements throws NPE after |
220 |
|
* possibly adding some elements |
229 |
|
shouldThrow(); |
230 |
|
} catch (NullPointerException success) {} |
231 |
|
} |
232 |
+ |
|
233 |
|
/** |
234 |
|
* addAll throws ISE if not enough room |
235 |
|
*/ |
243 |
|
shouldThrow(); |
244 |
|
} catch (IllegalStateException success) {} |
245 |
|
} |
246 |
+ |
|
247 |
|
/** |
248 |
|
* Queue contains all elements, in traversal order, of successful addAll |
249 |
|
*/ |
468 |
|
final LinkedBlockingQueue q = new LinkedBlockingQueue(2); |
469 |
|
Thread t = new Thread(new CheckedRunnable() { |
470 |
|
public void realRun() throws InterruptedException { |
468 |
– |
assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS)); |
469 |
– |
assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS)); |
471 |
|
try { |
472 |
+ |
assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS)); |
473 |
+ |
assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS)); |
474 |
|
q.poll(LONG_DELAY_MS, MILLISECONDS); |
475 |
|
shouldThrow(); |
476 |
|
} catch (InterruptedException success) {} |