public abstract class BlockingQueueTest 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 |
---|
BlockingQueueTest() |
Modifier and Type | Method and Description |
---|---|
protected abstract BlockingQueue |
emptyCollection()
Returns an empty instance of the implementation class.
|
protected Object |
makeElement(int i)
Returns an element suitable for insertion in the collection.
|
void |
testAddAllNull()
put(null) throws NullPointerException
|
void |
testAddAllNullElements()
addAll of a collection with null elements throws NullPointerException
|
void |
testAddNull()
add(null) throws NullPointerException
|
void |
testDrainToNonPositiveMaxElements()
drainTo(c, n) returns 0 and does nothing when n <= 0
|
void |
testDrainToNull()
drainTo(null) throws NullPointerException
|
void |
testDrainToNullN()
drainTo(null, n) throws NullPointerException
|
void |
testDrainToSelf()
drainTo(this) throws IllegalArgumentException
|
void |
testDrainToSelfN()
drainTo(this, n) throws IllegalArgumentException
|
void |
testOfferNull()
offer(null) throws NullPointerException
|
void |
testPutNull()
put(null) throws NullPointerException
|
void |
testRemoveElement()
remove(x) removes x and returns true if present
TODO: move to superclass CollectionTest.java
|
void |
testTakeFromEmptyAfterInterrupt()
take() throws InterruptedException immediately if interrupted
before waiting
|
void |
testTakeFromEmptyBlocksInterruptibly()
take() blocks interruptibly when empty
|
void |
testTimedOfferNull()
timed offer(null) throws NullPointerException
|
void |
testTimedPollFromEmptyAfterInterrupt()
timed poll() throws InterruptedException immediately if
interrupted before waiting
|
void |
testTimedPollFromEmptyBlocksInterruptibly()
timed poll() blocks interruptibly when empty
|
void |
testTimedPollWithOffer()
timed poll before a delayed offer times out; after offer succeeds;
on interruption throws
|
void |
testToArray_NullArray()
toArray(null) throws NullPointerException
|
void |
XXXXtestFails()
For debugging.
|
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
protected abstract BlockingQueue emptyCollection()
protected Object makeElement(int i)
public void testOfferNull()
public void testAddNull()
public void testTimedOfferNull() throws InterruptedException
InterruptedException
public void testPutNull() throws InterruptedException
InterruptedException
public void testAddAllNull() throws InterruptedException
InterruptedException
public void testAddAllNullElements()
public void testToArray_NullArray()
public void testDrainToNull()
public void testDrainToSelf()
public void testDrainToNullN()
public void testDrainToSelfN()
public void testDrainToNonPositiveMaxElements()
public void testTimedPollWithOffer() throws InterruptedException
InterruptedException
public void testTakeFromEmptyBlocksInterruptibly()
public void testTakeFromEmptyAfterInterrupt()
public void testTimedPollFromEmptyBlocksInterruptibly()
public void testTimedPollFromEmptyAfterInterrupt()
public void testRemoveElement()
public void XXXXtestFails()