use of net.openhft.chronicle.sandbox.queue.LocalConcurrentBlockingObjectQueue in project HugeCollections-OLD by peter-lawrey.
the class LocalJSR166TestCase method testIteratorOrdering.
/**
* iterator ordering is FIFO
*/
@Test
public void testIteratorOrdering() {
final BlockingQueue q = new LocalConcurrentBlockingObjectQueue(3);
q.add(one);
q.add(two);
q.add(three);
assertEquals("queue should be full", 0, q.remainingCapacity());
int k = 0;
for (Iterator it = q.iterator(); it.hasNext(); ) {
assertEquals(++k, it.next());
}
assertEquals(3, k);
}
Aggregations