public class LinkedBlockingQueueTest extends JSR166TestCase
Modifier and Type | Class and Description |
---|---|
static class |
LinkedBlockingQueueTest.Bounded |
static class |
LinkedBlockingQueueTest.Unbounded |
JSR166TestCase.AdjustablePolicy, JSR166TestCase.CallableOne, JSR166TestCase.CheckedBarrier, JSR166TestCase.CheckedCallable<T>, JSR166TestCase.CheckedInterruptedCallable<T>, JSR166TestCase.CheckedInterruptedRunnable, JSR166TestCase.CheckedRunnable, JSR166TestCase.LongPossiblyInterruptedRunnable, JSR166TestCase.MediumInterruptedRunnable, JSR166TestCase.MediumPossiblyInterruptedRunnable, JSR166TestCase.MediumRunnable, JSR166TestCase.NoOpCallable, JSR166TestCase.NoOpREHandler, JSR166TestCase.NoOpRunnable, JSR166TestCase.NPETask, JSR166TestCase.RunnableShouldThrow, JSR166TestCase.ShortInterruptedRunnable, JSR166TestCase.ShortRunnable, JSR166TestCase.SimpleThreadFactory, JSR166TestCase.SmallCallable, JSR166TestCase.SmallPossiblyInterruptedRunnable, JSR166TestCase.SmallRunnable, JSR166TestCase.StringTask, JSR166TestCase.ThreadShouldThrow, JSR166TestCase.TrackedCallable, JSR166TestCase.TrackedLongRunnable, JSR166TestCase.TrackedMediumRunnable, JSR166TestCase.TrackedNoOpRunnable, JSR166TestCase.TrackedRunnable, JSR166TestCase.TrackedShortRunnable, JSR166TestCase.TrackedSmallRunnable
eight, expensiveTests, five, four, LONG_DELAY_MS, m1, m10, m2, m3, m4, m5, m6, MEDIUM_DELAY_MS, nine, one, seven, SHORT_DELAY_MS, six, SIZE, SMALL_DELAY_MS, TEST_STRING, three, two, zero
Constructor and Description |
---|
LinkedBlockingQueueTest() |
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args) |
static junit.framework.Test |
suite() |
void |
testAdd()
add succeeds if not full; throws ISE if full
|
void |
testAddAll1()
addAll(null) throws NPE
|
void |
testAddAll2()
addAll of a collection with null elements throws NPE
|
void |
testAddAll3()
addAll of a collection with any null elements throws NPE after
possibly adding some elements
|
void |
testAddAll4()
addAll throws ISE if not enough room
|
void |
testAddAll5()
Queue contains all elements, in traversal order, of successful addAll
|
void |
testAddAllSelf()
addAll(this) throws IAE
|
void |
testAddNull()
add(null) throws NPE
|
void |
testBlockingPut()
put blocks interruptibly if full
|
void |
testBlockingTake()
Take removes existing elements until empty, then blocks interruptibly
|
void |
testClear()
clear removes all elements
|
void |
testConstructor1()
A new queue has the indicated capacity, or Integer.MAX_VALUE if
none given
|
void |
testConstructor2()
Constructor throws IAE if capacity argument nonpositive
|
void |
testConstructor3()
Initializing from null Collection throws NPE
|
void |
testConstructor4()
Initializing from Collection of null elements throws NPE
|
void |
testConstructor5()
Initializing from Collection with some null elements throws NPE
|
void |
testConstructor6()
Queue contains all elements of collection used to initialize
|
void |
testContains()
contains(x) reports true when elements added but not yet removed
|
void |
testContainsAll()
containsAll(c) is true when c contains a subset of elements
|
void |
testDrainTo()
drainTo(c) empties queue into another collection c
|
void |
testDrainToN()
drainTo(c, n) empties first min(n, size) elements of queue into c
|
void |
testDrainToNull()
drainTo(null) throws NPE
|
void |
testDrainToNullN()
drainTo(null, n) throws NPE
|
void |
testDrainToSelf()
drainTo(this) throws IAE
|
void |
testDrainToSelfN()
drainTo(this, n) throws IAE
|
void |
testDrainToWithActivePut()
drainTo empties full queue, unblocking a waiting put.
|
void |
testElement()
element returns next element, or throws NSEE if empty
|
void |
testEmptyFull()
Queue transitions from empty to full when elements added
|
void |
testInterruptedTimedPoll()
Interrupted timed poll throws InterruptedException instead of
returning timeout status
|
void |
testIterator()
iterator iterates through all elements
|
void |
testIteratorOrdering()
iterator ordering is FIFO
|
void |
testIteratorRemove()
iterator.remove removes current element
|
void |
testOffer()
Offer succeeds if not full; fails if full
|
void |
testOfferInExecutor()
offer transfers elements across Executor tasks
|
void |
testOfferNull()
offer(null) throws NPE
|
void |
testPeek()
peek returns next element, or null if empty
|
void |
testPoll()
poll succeeds unless empty
|
void |
testPollInExecutor()
poll retrieves elements across Executor threads
|
void |
testPut()
all elements successfully put are contained
|
void |
testPutNull()
put(null) throws NPE
|
void |
testPutWithTake()
put blocks waiting for take when full
|
void |
testRemainingCapacity()
remainingCapacity decreases on add, increases on remove
|
void |
testRemove()
remove removes next element, or throws NSEE if empty
|
void |
testRemoveAll()
removeAll(c) removes only those elements of c and reports true if changed
|
void |
testRemoveElement()
remove(x) removes x and returns true if present
|
void |
testRemoveElementAndAdd()
An add following remove(x) succeeds
|
void |
testRetainAll()
retainAll(c) retains only those elements of c and reports true if changed
|
void |
testSerialization()
A deserialized serialized queue has same elements in same order
|
void |
testTake()
take retrieves elements in FIFO order
|
void |
testTimedOffer()
timed offer times out if full and elements not taken
|
void |
testTimedPoll()
timed poll with nonzero timeout succeeds when non-empty, else times out
|
void |
testTimedPoll0()
timed poll with zero timeout succeeds when non-empty, else times out
|
void |
testToArray_NullArg()
toArray(null) throws NullPointerException
|
void |
testToArray()
toArray contains all elements in FIFO order
|
void |
testToArray1_BadArg()
toArray(incompatible array type) throws ArrayStoreException
|
void |
testToArray2()
toArray(a) contains all elements in FIFO order
|
void |
testToString()
toString contains toStrings of elements
|
void |
testWeaklyConsistentIteration()
Modifications do not cause iterators to fail
|
awaiter, checkEmpty, getShortDelay, joinPool, latchAwaitingStringTask, newTestSuite, permissivePolicy, possiblyInterruptedRunnable, runTest, runTestProfiled, runWithoutPermissions, runWithPermissions, setDelays, setUp, shouldThrow, shouldThrow, tearDown, threadAssertEquals, threadAssertEquals, threadAssertFalse, threadAssertNull, threadAssertSame, threadAssertTrue, threadFail, threadRecordFailure, threadShouldThrow, threadShouldThrow, threadUnexpectedException, trackedRunnable
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, setName, toString
public static void main(String[] args)
public static junit.framework.Test suite()
public void testConstructor1()
public void testConstructor2()
public void testConstructor3()
public void testConstructor4()
public void testConstructor5()
public void testConstructor6()
public void testEmptyFull()
public void testRemainingCapacity()
public void testOfferNull()
public void testAddNull()
public void testOffer()
public void testAdd()
public void testAddAll1()
public void testAddAllSelf()
public void testAddAll2()
public void testAddAll3()
public void testAddAll4()
public void testAddAll5()
public void testPutNull() throws InterruptedException
InterruptedException
public void testPut() throws InterruptedException
InterruptedException
public void testBlockingPut() throws InterruptedException
InterruptedException
public void testPutWithTake() throws InterruptedException
InterruptedException
public void testTimedOffer() throws InterruptedException
InterruptedException
public void testTake() throws InterruptedException
InterruptedException
public void testBlockingTake() throws InterruptedException
InterruptedException
public void testPoll()
public void testTimedPoll0() throws InterruptedException
InterruptedException
public void testTimedPoll() throws InterruptedException
InterruptedException
public void testInterruptedTimedPoll() throws InterruptedException
InterruptedException
public void testPeek()
public void testElement()
public void testRemove()
public void testRemoveElement()
public void testRemoveElementAndAdd() throws InterruptedException
InterruptedException
public void testContains()
public void testClear()
public void testContainsAll()
public void testRetainAll()
public void testRemoveAll()
public void testToArray()
public void testToArray2() throws InterruptedException
InterruptedException
public void testToArray_NullArg()
public void testToArray1_BadArg()
public void testIterator() throws InterruptedException
InterruptedException
public void testIteratorRemove()
public void testIteratorOrdering()
public void testWeaklyConsistentIteration()
public void testToString()
public void testOfferInExecutor()
public void testPollInExecutor()
public void testSerialization() throws Exception
Exception
public void testDrainToNull()
public void testDrainToSelf()
public void testDrainTo()
public void testDrainToWithActivePut() throws InterruptedException
InterruptedException
public void testDrainToNullN()
public void testDrainToSelfN()
public void testDrainToN()
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.