356 |
|
final SynchronousQueue q = new SynchronousQueue(); |
357 |
|
Thread t = new Thread(new CheckedRunnable() { |
358 |
|
public void realRun() throws InterruptedException { |
359 |
< |
threadAssertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS)); |
359 |
> |
assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS)); |
360 |
|
assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS)); |
361 |
|
try { |
362 |
|
q.poll(LONG_DELAY_MS, MILLISECONDS); |
363 |
< |
threadShouldThrow(); |
363 |
> |
shouldThrow(); |
364 |
|
} catch (InterruptedException success) {} |
365 |
|
}}); |
366 |
|
|
396 |
|
final SynchronousQueue q = new SynchronousQueue(true); |
397 |
|
Thread t = new Thread(new CheckedRunnable() { |
398 |
|
public void realRun() throws InterruptedException { |
399 |
< |
threadAssertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS)); |
399 |
> |
assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS)); |
400 |
|
assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS)); |
401 |
|
try { |
402 |
|
q.poll(LONG_DELAY_MS, MILLISECONDS); |
439 |
|
try { |
440 |
|
q.remove(); |
441 |
|
shouldThrow(); |
442 |
< |
} catch (NoSuchElementException success) { |
443 |
< |
} |
442 |
> |
} catch (NoSuchElementException success) {} |
443 |
|
} |
444 |
|
|
445 |
|
/** |
705 |
|
try { |
706 |
|
q.drainTo(q, 0); |
707 |
|
shouldThrow(); |
708 |
< |
} catch (IllegalArgumentException success) { |
710 |
< |
} |
708 |
> |
} catch (IllegalArgumentException success) {} |
709 |
|
} |
710 |
|
|
711 |
|
/** |