common: Fix flaky BufferedBlockingQueue test
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Tue, 5 May 2015 02:32:00 +0000 (22:32 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Tue, 5 May 2015 18:25:13 +0000 (14:25 -0400)
commitd6e2666be6c1a75c092e320c71aa6958d408156f
treeae61ab0da767267a98d7520a3b907288f2d51fca
parent6d16f5a931f0bd9d21ccc04025610fb5a211ec27
common: Fix flaky BufferedBlockingQueue test

The test testing concurrent insertion/removals/iterations
incorrectly assumed that all elements send to the queue would
show up in the iterator.

This is a known limitation of BBQ's iterator(), and is documented
in its Javadoc. The elements present in the queue at the time the
iterator is created will be either seen by the iterator OR consumed
by the consumer.

We cannot assume anything with regards to the iterator's contents.
A separate (sequential) test for the iterator's contents will be
provied.

Change-Id: I3d281ca1ad4a81e69f02363b52942990424dd57c
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/47115
Reviewed-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
org.eclipse.tracecompass.common.core.tests/src/org/eclipse/tracecompass/common/core/tests/collect/BufferedBlockingQueueTest.java
This page took 0.026514 seconds and 5 git commands to generate.