|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
JSR166TestCase
SynchronousQueueTest
public class SynchronousQueueTest
| Nested Class Summary | |
|---|---|
static class |
SynchronousQueueTest.Fair
|
static class |
SynchronousQueueTest.NonFair
|
| Field Summary |
|---|
| Fields inherited from class JSR166TestCase |
|---|
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 Summary | |
|---|---|
SynchronousQueueTest()
|
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
|
static junit.framework.Test |
suite()
|
void |
testAdd()
add throws ISE if no active taker |
void |
testAddAll1()
addAll(null) throws NPE |
void |
testAddAll2()
addAll of a collection with null elements throws NPE |
void |
testAddAll4()
addAll throws ISE if no active taker |
void |
testAddAllSelf()
addAll(this) throws IAE |
void |
testAddNull()
add(null) throws NPE |
void |
testBlockingPut()
put blocks interruptibly if no active taker |
void |
testClear()
clear ensures isEmpty |
void |
testContains()
contains returns false |
void |
testContainsAll()
containsAll returns false unless empty |
void |
testDrainTo()
drainTo(c) of empty queue doesn't transfer elements |
void |
testDrainToN()
drainTo(c, n) empties up to n 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 queue, unblocking a waiting put. |
void |
testElement()
element() throws NSEE if no active putter |
void |
testEmptyFull()
A non-fair SynchronousQueue is both empty and full |
void |
testEmptyFull(java.util.concurrent.SynchronousQueue q)
Any SynchronousQueue is both empty and full |
void |
testFairBlockingPut()
put blocks interruptibly if no active taker |
void |
testFairEmptyFull()
A fair SynchronousQueue is both empty and full |
void |
testFairInterruptedTimedPoll()
Interrupted timed poll throws InterruptedException instead of returning timeout status |
void |
testFairPutWithTake()
put blocks waiting for take |
void |
testFairTakeFromEmpty()
take blocks interruptibly when empty |
void |
testFairTimedOffer()
timed offer times out if elements not taken |
void |
testFairTimedPollWithOffer()
timed poll before a delayed offer times out, returning null; after offer succeeds; on interruption throws |
void |
testInterruptedTimedPoll()
Interrupted timed poll throws InterruptedException instead of returning timeout status |
void |
testInterruptedTimedPoll(java.util.concurrent.SynchronousQueue q)
Interrupted timed poll throws InterruptedException instead of returning timeout status |
void |
testIterator()
iterator does not traverse any elements |
void |
testIteratorRemove()
iterator remove throws ISE |
void |
testOffer()
offer fails if no active taker |
void |
testOfferInExecutor()
offer transfers elements across Executor tasks |
void |
testOfferNull()
offer(null) throws NPE |
void |
testPeek()
peek() returns null if no active putter |
void |
testPoll()
poll return null if no active putter |
void |
testPollInExecutor()
poll retrieves elements across Executor threads |
void |
testPutNull()
put(null) throws NPE |
void |
testPutWithTake()
put blocks waiting for take |
void |
testRemove()
remove() throws NSEE if no active putter |
void |
testRemoveAll()
removeAll returns false |
void |
testRemoveElement()
remove(x) returns false |
void |
testRetainAll()
retainAll returns false |
void |
testSerialization()
a deserialized serialized queue is usable |
void |
testTimedOffer()
timed offer times out if elements not taken |
void |
testTimedOffer(java.util.concurrent.SynchronousQueue q)
timed offer times out if elements not taken |
void |
testTimedPoll()
timed poll with nonzero timeout times out if no active putter |
void |
testTimedPoll0()
timed poll with zero timeout times out if no active putter |
void |
testToArray_BadArg()
toArray(null) throws NPE |
void |
testToArray()
toArray is empty |
void |
testToArray2()
toArray(a) is nulled at position 0 |
void |
testToString()
toString returns a non-null string |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, setName, toString |
| Methods inherited from class junit.framework.Assert |
|---|
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, fail, fail, failNotEquals, failNotSame, failSame, format |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SynchronousQueueTest()
| Method Detail |
|---|
public static void main(java.lang.String[] args)
public static junit.framework.Test suite()
public void testEmptyFull(java.util.concurrent.SynchronousQueue q)
public void testEmptyFull()
public void testFairEmptyFull()
public void testOfferNull()
public void testAddNull()
public void testOffer()
public void testAdd()
public void testAddAll1()
public void testAddAllSelf()
public void testAddAll2()
public void testAddAll4()
public void testPutNull()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testBlockingPut()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testPutWithTake()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testTimedOffer(java.util.concurrent.SynchronousQueue q)
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testTimedOffer()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testFairTimedOffer()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testFairBlockingPut()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testFairPutWithTake()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testFairTakeFromEmpty()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testPoll()
public void testTimedPoll0()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testTimedPoll()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testInterruptedTimedPoll(java.util.concurrent.SynchronousQueue q)
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testInterruptedTimedPoll()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testFairInterruptedTimedPoll()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testFairTimedPollWithOffer()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testPeek()
public void testElement()
public void testRemove()
public void testRemoveElement()
public void testContains()
public void testClear()
public void testContainsAll()
public void testRetainAll()
public void testRemoveAll()
public void testToArray()
public void testToArray2()
public void testToArray_BadArg()
public void testIterator()
public void testIteratorRemove()
public void testToString()
public void testOfferInExecutor()
public void testPollInExecutor()
public void testSerialization()
throws java.lang.Exception
java.lang.Exceptionpublic void testDrainToNull()
public void testDrainToSelf()
public void testDrainTo()
public void testDrainToWithActivePut()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testDrainToNullN()
public void testDrainToSelfN()
public void testDrainToN()
throws java.lang.InterruptedException
java.lang.InterruptedException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||