public class CyclicBarrierTest 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 |
---|
CyclicBarrierTest() |
Modifier and Type | Method and Description |
---|---|
void |
testAwait1_Interrupted_BrokenBarrier()
An interruption in one party causes others waiting in await to
throw BrokenBarrierException
|
void |
testAwait2_Interrupted_BrokenBarrier()
An interruption in one party causes others waiting in timed await to
throw BrokenBarrierException
|
void |
testAwait3_TimeoutException()
A timeout in timed await throws TimeoutException
|
void |
testAwait4_Timeout_BrokenBarrier()
A timeout in one party causes others waiting in timed await to
throw BrokenBarrierException
|
void |
testAwait5_Timeout_BrokenBarrier()
A timeout in one party causes others waiting in await to
throw BrokenBarrierException
|
void |
testBarrierAction()
The supplied barrier action is run at barrier
|
void |
testConstructor1()
Creating with negative parties throws IAE
|
void |
testConstructor2()
Creating with negative parties and no action throws IAE
|
void |
testGetParties()
getParties returns the number of parties given in constructor
|
void |
testReset_BrokenBarrier()
A reset of an active barrier causes waiting threads to throw
BrokenBarrierException
|
void |
testReset_Leakage()
All threads block while a barrier is broken.
|
void |
testReset_NoBrokenBarrier()
A reset before threads enter barrier does not throw
BrokenBarrierException
|
void |
testResetAfterCommandException()
Reset of a barrier after a failed command reinitializes it.
|
void |
testResetAfterInterrupt()
Reset of a barrier after interruption reinitializes it.
|
void |
testResetAfterTimeout()
Reset of a barrier after timeout reinitializes it.
|
void |
testResetWithoutBreakage()
Reset of a non-broken barrier does not break barrier
|
void |
testSingleParty()
A 1-party barrier triggers after single await
|
void |
testTwoParties()
A 2-party/thread barrier triggers after both threads invoke await
|
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 testConstructor1()
public void testConstructor2()
public void testGetParties()
public void testSingleParty() throws Exception
Exception
public void testBarrierAction() throws Exception
Exception
public void testTwoParties() throws Exception
Exception
public void testAwait1_Interrupted_BrokenBarrier()
public void testAwait2_Interrupted_BrokenBarrier() throws Exception
Exception
public void testAwait3_TimeoutException() throws InterruptedException
InterruptedException
public void testAwait4_Timeout_BrokenBarrier() throws InterruptedException
InterruptedException
public void testAwait5_Timeout_BrokenBarrier() throws InterruptedException
InterruptedException
public void testReset_BrokenBarrier() throws InterruptedException
InterruptedException
public void testReset_NoBrokenBarrier() throws Exception
Exception
public void testReset_Leakage() throws InterruptedException
InterruptedException
public void testResetWithoutBreakage() throws Exception
Exception
public void testResetAfterInterrupt() throws Exception
Exception
public void testResetAfterTimeout() throws Exception
Exception