172 |
|
catch (InterruptedException e) { threadUnexpectedException(e); } |
173 |
|
|
174 |
|
await(pleaseInterrupt); |
175 |
< |
assertThreadStaysAlive(t); |
175 |
> |
assertThreadBlocks(t, Thread.State.WAITING); |
176 |
|
t.interrupt(); |
177 |
|
awaitTermination(t); |
178 |
|
assertEquals(0, q.remainingCapacity()); |
401 |
|
public void testToArray2() { testToArray2(false); } |
402 |
|
public void testToArray2_fair() { testToArray2(true); } |
403 |
|
public void testToArray2(boolean fair) { |
404 |
< |
final SynchronousQueue<Integer> q |
405 |
< |
= new SynchronousQueue<Integer>(fair); |
404 |
> |
final SynchronousQueue<Integer> q = new SynchronousQueue<>(fair); |
405 |
|
Integer[] a; |
406 |
|
|
407 |
|
a = new Integer[0]; |
569 |
|
fail("timed out"); |
570 |
|
Thread.yield(); |
571 |
|
} |
572 |
< |
assertTrue(l.size() == 1); |
572 |
> |
assertEquals(1, l.size()); |
573 |
|
assertSame(one, l.get(0)); |
574 |
|
awaitTermination(t); |
575 |
|
} |