48 |
|
|
49 |
|
/** |
50 |
|
* Returns a new queue of given size containing consecutive |
51 |
< |
* Integers 0 ... n. |
51 |
> |
* Integers 0 ... n - 1. |
52 |
|
*/ |
53 |
|
private LinkedBlockingQueue<Integer> populatedQueue(int n) { |
54 |
|
LinkedBlockingQueue<Integer> q = |
59 |
|
assertFalse(q.isEmpty()); |
60 |
|
assertEquals(0, q.remainingCapacity()); |
61 |
|
assertEquals(n, q.size()); |
62 |
+ |
assertEquals((Integer) 0, q.peek()); |
63 |
|
return q; |
64 |
|
} |
65 |
|
|
455 |
|
}}); |
456 |
|
|
457 |
|
await(aboutToWait); |
458 |
< |
waitForThreadToEnterWaitState(t, LONG_DELAY_MS); |
458 |
> |
waitForThreadToEnterWaitState(t); |
459 |
|
t.interrupt(); |
460 |
|
awaitTermination(t); |
461 |
|
checkEmpty(q); |