56 |
|
|
57 |
|
/** |
58 |
|
* Returns a new queue of given size containing consecutive |
59 |
< |
* Integers 0 ... n. |
59 |
> |
* Integers 0 ... n - 1. |
60 |
|
*/ |
61 |
|
private PriorityBlockingQueue<Integer> populatedQueue(int n) { |
62 |
|
PriorityBlockingQueue<Integer> q = |
69 |
|
assertFalse(q.isEmpty()); |
70 |
|
assertEquals(Integer.MAX_VALUE, q.remainingCapacity()); |
71 |
|
assertEquals(n, q.size()); |
72 |
+ |
assertEquals((Integer) 0, q.peek()); |
73 |
|
return q; |
74 |
|
} |
75 |
|
|
411 |
|
}}); |
412 |
|
|
413 |
|
aboutToWait.await(); |
414 |
< |
waitForThreadToEnterWaitState(t, LONG_DELAY_MS); |
414 |
> |
waitForThreadToEnterWaitState(t); |
415 |
|
t.interrupt(); |
416 |
|
awaitTermination(t); |
417 |
|
} |