public class SynchronousQueueTest extends JSR166TestCase
JSR166TestCase.AdjustablePolicy, JSR166TestCase.CallableOne, JSR166TestCase.CheckedBarrier, JSR166TestCase.CheckedCallable<T>, JSR166TestCase.CheckedInterruptedCallable<T>, JSR166TestCase.CheckedInterruptedRunnable, JSR166TestCase.CheckedRecursiveAction, JSR166TestCase.CheckedRecursiveTask<T>, 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, JAVA_CLASS_VERSION, JAVA_SPECIFICATION_VERSION, 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, testImplementationDetails, three, two, zero
Constructor and Description |
---|
SynchronousQueueTest() |
Modifier and Type | Method and Description |
---|---|
void |
testAdd_fair() |
void |
testAdd()
add throws IllegalStateException if no active taker
|
void |
testAdd(boolean fair) |
void |
testAddAll_ISE_fair() |
void |
testAddAll_ISE()
addAll throws ISE if no active taker
|
void |
testAddAll_ISE(boolean fair) |
void |
testAddAll_self_fair() |
void |
testAddAll_self()
addAll(this) throws IllegalArgumentException
|
void |
testAddAll_self(boolean fair) |
void |
testBlockingPut_fair() |
void |
testBlockingPut()
put blocks interruptibly if no active taker
|
void |
testBlockingPut(boolean fair) |
void |
testClear_fair() |
void |
testClear()
clear ensures isEmpty
|
void |
testClear(boolean fair) |
void |
testContains_fair() |
void |
testContains()
contains returns false
|
void |
testContains(boolean fair) |
void |
testContainsAll_fair() |
void |
testContainsAll()
containsAll returns false unless empty
|
void |
testContainsAll(boolean fair) |
void |
testDrainTo_fair() |
void |
testDrainTo()
drainTo(c) of empty queue doesn't transfer elements
|
void |
testDrainTo(boolean fair) |
void |
testDrainToN()
drainTo(c, n) empties up to n elements of queue into c
|
void |
testDrainToWithActivePut_fair() |
void |
testDrainToWithActivePut()
drainTo empties queue, unblocking a waiting put.
|
void |
testDrainToWithActivePut(boolean fair) |
void |
testElement_fair() |
void |
testElement()
element() throws NoSuchElementException if no active putter
|
void |
testElement(boolean fair) |
void |
testEmptyFull_fair() |
void |
testEmptyFull()
Any SynchronousQueue is both empty and full
|
void |
testEmptyFull(boolean fair) |
void |
testIterator_fair() |
void |
testIterator()
iterator does not traverse any elements
|
void |
testIterator(boolean fair) |
void |
testIteratorRemove_fair() |
void |
testIteratorRemove()
iterator remove throws ISE
|
void |
testIteratorRemove(boolean fair) |
void |
testNeverContainsNull()
remove(null), contains(null) always return false
|
void |
testOffer_fair() |
void |
testOffer()
offer fails if no active taker
|
void |
testOffer(boolean fair) |
void |
testOfferInExecutor_fair() |
void |
testOfferInExecutor()
offer transfers elements across Executor tasks
|
void |
testOfferInExecutor(boolean fair) |
void |
testPeek_fair() |
void |
testPeek()
peek() returns null if no active putter
|
void |
testPeek(boolean fair) |
void |
testPoll_fair() |
void |
testPoll()
poll return null if no active putter
|
void |
testPoll(boolean fair) |
void |
testPollInExecutor_fair() |
void |
testPollInExecutor()
timed poll retrieves elements across Executor threads
|
void |
testPollInExecutor(boolean fair) |
void |
testPutWithTake_fair() |
void |
testPutWithTake()
put blocks interruptibly waiting for take
|
void |
testPutWithTake(boolean fair) |
void |
testRemove_fair() |
void |
testRemove()
remove() throws NoSuchElementException if no active putter
|
void |
testRemove(boolean fair) |
void |
testRemoveAll_fair() |
void |
testRemoveAll()
removeAll returns false
|
void |
testRemoveAll(boolean fair) |
void |
testRetainAll_fair() |
void |
testRetainAll()
retainAll returns false
|
void |
testRetainAll(boolean fair) |
void |
testSerialization()
a deserialized serialized queue is usable
|
void |
testTimedOffer_fair() |
void |
testTimedOffer()
timed offer times out if elements not taken
|
void |
testTimedOffer(boolean fair) |
void |
testTimedPoll_fair() |
void |
testTimedPoll()
timed poll with nonzero timeout times out if no active putter
|
void |
testTimedPoll(boolean fair) |
void |
testTimedPoll0_fair() |
void |
testTimedPoll0()
timed poll with zero timeout times out if no active putter
|
void |
testTimedPoll0(boolean fair) |
void |
testTimedPollWithOffer_fair() |
void |
testTimedPollWithOffer()
timed poll before a delayed offer times out, returning null;
after offer succeeds; on interruption throws
|
void |
testTimedPollWithOffer(boolean fair) |
void |
testToArray_fair() |
void |
testToArray_null_fair() |
void |
testToArray_null()
toArray(null) throws NPE
|
void |
testToArray_null(boolean fair) |
void |
testToArray()
toArray is empty
|
void |
testToArray(boolean fair) |
void |
testToArray2_fair() |
void |
testToArray2()
toArray(Integer array) returns its argument with the first
element (if present) nulled out
|
void |
testToArray2(boolean fair) |
void |
testToString_fair() |
void |
testToString()
toString returns a non-null string
|
void |
testToString(boolean fair) |
addNamedTestClasses, assertIteratorExhausted, assertThrows, atLeastJava10, atLeastJava6, atLeastJava7, atLeastJava8, atLeastJava9, await, await, await, awaiter, countDowner, getShortDelay, jdk8ParameterizedTestSuite, latchAwaitingStringTask, newTestSuite, parameterizedTestSuite, permissivePolicy, possiblyInterruptedRunnable, runBare, runTest, runTestProfiled, runWithoutPermissions, runWithPermissions, runWithSecurityManagerWithPermissions, setDelays, setUp, shouldThrow, shouldThrow, tearDown, testMethodNames, threadAssertEquals, threadAssertEquals, threadAssertFalse, threadAssertNull, threadAssertSame, threadAssertTrue, threadFail, threadRecordFailure, threadShouldThrow, threadShouldThrow, threadUnexpectedException, trackedRunnable
public void testEmptyFull()
public void testEmptyFull_fair()
public void testEmptyFull(boolean fair)
public void testOffer()
public void testOffer_fair()
public void testOffer(boolean fair)
public void testAdd()
public void testAdd_fair()
public void testAdd(boolean fair)
public void testAddAll_self()
public void testAddAll_self_fair()
public void testAddAll_self(boolean fair)
public void testAddAll_ISE()
public void testAddAll_ISE_fair()
public void testAddAll_ISE(boolean fair)
public void testBlockingPut()
public void testBlockingPut_fair()
public void testBlockingPut(boolean fair)
public void testPutWithTake()
public void testPutWithTake_fair()
public void testPutWithTake(boolean fair)
public void testTimedOffer()
public void testTimedOffer_fair()
public void testTimedOffer(boolean fair)
public void testPoll()
public void testPoll_fair()
public void testPoll(boolean fair)
public void testTimedPoll0()
public void testTimedPoll0_fair()
public void testTimedPoll0(boolean fair)
public void testTimedPoll()
public void testTimedPoll_fair()
public void testTimedPoll(boolean fair)
public void testTimedPollWithOffer()
public void testTimedPollWithOffer_fair()
public void testTimedPollWithOffer(boolean fair)
public void testPeek()
public void testPeek_fair()
public void testPeek(boolean fair)
public void testElement()
public void testElement_fair()
public void testElement(boolean fair)
public void testRemove()
public void testRemove_fair()
public void testRemove(boolean fair)
public void testContains()
public void testContains_fair()
public void testContains(boolean fair)
public void testClear()
public void testClear_fair()
public void testClear(boolean fair)
public void testContainsAll()
public void testContainsAll_fair()
public void testContainsAll(boolean fair)
public void testRetainAll()
public void testRetainAll_fair()
public void testRetainAll(boolean fair)
public void testRemoveAll()
public void testRemoveAll_fair()
public void testRemoveAll(boolean fair)
public void testToArray()
public void testToArray_fair()
public void testToArray(boolean fair)
public void testToArray2()
public void testToArray2_fair()
public void testToArray2(boolean fair)
public void testToArray_null()
public void testToArray_null_fair()
public void testToArray_null(boolean fair)
public void testIterator()
public void testIterator_fair()
public void testIterator(boolean fair)
public void testIteratorRemove()
public void testIteratorRemove_fair()
public void testIteratorRemove(boolean fair)
public void testToString()
public void testToString_fair()
public void testToString(boolean fair)
public void testOfferInExecutor()
public void testOfferInExecutor_fair()
public void testOfferInExecutor(boolean fair)
public void testPollInExecutor()
public void testPollInExecutor_fair()
public void testPollInExecutor(boolean fair)
public void testSerialization()
public void testDrainTo()
public void testDrainTo_fair()
public void testDrainTo(boolean fair)
public void testDrainToWithActivePut()
public void testDrainToWithActivePut_fair()
public void testDrainToWithActivePut(boolean fair)
public void testDrainToN() throws InterruptedException
InterruptedException
public void testNeverContainsNull()