|
||||||||
| 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
AbstractQueuedLongSynchronizerTest
public class AbstractQueuedLongSynchronizerTest
| Nested Class Summary |
|---|
| 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 | |
|---|---|
AbstractQueuedLongSynchronizerTest()
|
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
|
static junit.framework.Test |
suite()
|
void |
testAcquire()
acquiring released sync succeeds |
void |
testAcquireInterruptibly1()
acquireInterruptibly is interruptible. |
void |
testAcquireInterruptibly2()
acquireInterruptibly succeeds when released, else is interruptible |
void |
testAcquireNanos_Timeout()
tryAcquireNanos on an exclusively held sync times out |
void |
testAcquireSharedInterruptibly_InterruptedException()
acquireSharedInterruptibly throws IE if interrupted before released |
void |
testAcquireSharedInterruptibly()
acquireSharedInterruptibly returns after release, but not before |
void |
testAcquireSharedNanos_InterruptedException()
acquireSharedTimed throws IE if interrupted before released |
void |
testAcquireSharedNanos_Timeout()
acquireSharedTimed times out if not released before timeout |
void |
testAcquireSharedTimed()
acquireSharedTimed returns after release |
void |
testAwait_IllegalMonitor()
Calling await without holding sync throws IllegalMonitorStateException |
void |
testAwait_Interrupt()
await is interruptible |
void |
testAwait_Timeout()
Timed await without a signal times out |
void |
testAwait()
await returns when signalled |
void |
testAwaitNanos_Interrupt()
awaitNanos is interruptible |
void |
testAwaitNanos_Timeout()
awaitNanos without a signal times out |
void |
testAwaitUninterruptibly()
awaitUninterruptibly doesn't abort on interrupt |
void |
testAwaitUntil_Interrupt()
awaitUntil is interruptible |
void |
testAwaitUntil_Timeout()
awaitUntil without a signal times out |
void |
testGetExclusiveQueuedThreads()
getExclusiveQueuedThreads includes waiting threads |
void |
testGetFirstQueuedThread()
getFirstQueuedThread returns first waiting thread or null if none |
void |
testGetQueuedThreads()
getQueuedThreads includes waiting threads |
void |
testGetSharedQueuedThreads()
getSharedQueuedThreads does not include exclusively waiting threads |
void |
testGetState()
getState is true when acquired and false when not |
void |
testGetStateWithReleaseShared()
tryReleaseShared setting state changes getState |
void |
testGetWaitingThreads()
getWaitingThreads returns only and all waiting threads |
void |
testGetWaitingThreadsIAE()
getWaitingThreads throws IAE if not owned |
void |
testGetWaitingThreadsIMSE()
getWaitingThreads throws IMSE if not synced |
void |
testGetWaitingThreadsNPE()
getWaitingThreads throws NPE if null |
void |
testGetWaitQueueLength()
getWaitQueueLength returns number of waiting threads |
void |
testGetWaitQueueLengthIAE()
getWaitQueueLength throws IAE if not owned |
void |
testGetWaitQueueLengthIMSE()
getWaitQueueLength throws IMSE if not synced |
void |
testGetWaitQueueLengthNPE()
getWaitQueueLength throws NPE if null |
void |
testHasContended()
hasContended reports false if no thread has ever blocked, else true |
void |
testhasQueuedThreads()
hasQueuedThreads reports whether there are waiting threads |
void |
testHasWaiters()
hasWaiters returns true when a thread is waiting, else false |
void |
testHasWaitersIAE()
hasWaiters throws IAE if not owned |
void |
testHasWaitersIMSE()
hasWaiters throws IMSE if not synced |
void |
testHasWaitersNPE()
hasWaiters throws NPE if null |
void |
testInterruptedException2()
tryAcquireNanos is interruptible. |
void |
testIsHeldExclusively()
isHeldExclusively is false upon construction |
void |
testIsQueued()
isQueued reports whether a thread is queued. |
void |
testIsQueuedNPE()
isQueued(null) throws NPE |
void |
testOwns()
owns is true for a condition created by sync else false |
void |
testReleaseShared()
releaseShared has no effect when already signalled |
void |
testSerialization()
A serialized AQS deserializes with current state |
void |
testSignal_IllegalMonitor()
Calling signal without holding sync throws IllegalMonitorStateException |
void |
testSignalAll()
signalAll wakes up all threads |
void |
testToString()
toString indicates current state |
void |
testTryAcquire()
tryAcquire on an released sync succeeds |
void |
testTryAcquireWhenSynced()
TryAcquire on exclusively held sync fails |
| 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 AbstractQueuedLongSynchronizerTest()
| Method Detail |
|---|
public static void main(java.lang.String[] args)
public static junit.framework.Test suite()
public void testIsHeldExclusively()
public void testAcquire()
public void testTryAcquire()
public void testhasQueuedThreads()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testIsQueuedNPE()
public void testIsQueued()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testGetFirstQueuedThread()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testHasContended()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testGetQueuedThreads()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testGetExclusiveQueuedThreads()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testGetSharedQueuedThreads()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testInterruptedException2()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testTryAcquireWhenSynced()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testAcquireNanos_Timeout()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testGetState()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testAcquireInterruptibly1()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testAcquireInterruptibly2()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testOwns()
public void testAwait_IllegalMonitor()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testSignal_IllegalMonitor()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testAwaitNanos_Timeout()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testAwait_Timeout()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testAwaitUntil_Timeout()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testAwait()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testHasWaitersNPE()
public void testGetWaitQueueLengthNPE()
public void testGetWaitingThreadsNPE()
public void testHasWaitersIAE()
public void testHasWaitersIMSE()
public void testGetWaitQueueLengthIAE()
public void testGetWaitQueueLengthIMSE()
public void testGetWaitingThreadsIAE()
public void testGetWaitingThreadsIMSE()
public void testHasWaiters()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testGetWaitQueueLength()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testGetWaitingThreads()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testAwaitUninterruptibly()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testAwait_Interrupt()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testAwaitNanos_Interrupt()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testAwaitUntil_Interrupt()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testSignalAll()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testToString()
public void testSerialization()
throws java.lang.Exception
java.lang.Exceptionpublic void testGetStateWithReleaseShared()
public void testReleaseShared()
public void testAcquireSharedInterruptibly()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testAcquireSharedTimed()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testAcquireSharedInterruptibly_InterruptedException()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testAcquireSharedNanos_InterruptedException()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testAcquireSharedNanos_Timeout()
throws java.lang.InterruptedException
java.lang.InterruptedException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||