public class SynchronizedComponentAdapterTestCase
extends junit.framework.TestCase
| Modifier and Type | Class and Description |
|---|---|
class |
SynchronizedComponentAdapterTestCase.Blocker |
(package private) class |
SynchronizedComponentAdapterTestCase.Runner |
static class |
SynchronizedComponentAdapterTestCase.SlowCtor |
| Modifier and Type | Field and Description |
|---|---|
private int |
blockerCounter |
private SynchronizedComponentAdapterTestCase.Runner[] |
runner |
| Constructor and Description |
|---|
SynchronizedComponentAdapterTestCase() |
| Modifier and Type | Method and Description |
|---|---|
private void |
initTest(org.picocontainer.ComponentAdapter componentAdapter) |
private void |
runConcurrencyTest(org.picocontainer.defaults.DefaultPicoContainer pico) |
void |
testRaceConditionIsHandledBySynchronizedComponentAdapter() |
void |
testRaceConditionIsNotHandledWithoutSynchronizedComponentAdapter() |
void |
testSingletonCreationWithSynchronizedAdapterAndDoubleLocking() |
void |
testSingletonCreationWithSynchronizedAdapterOutside() |
void |
testSingletonCreationWithSynchronizedAdapterOutsideUsingFactory() |
void |
THIS_NATURALLY_FAILS_testSingletonCreationRace() |
void |
THIS_NATURALLY_FAILS_testSingletonCreationWithSynchronizedAdapter() |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toStringassertEquals, 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, failSameprivate SynchronizedComponentAdapterTestCase.Runner[] runner
private int blockerCounter
public SynchronizedComponentAdapterTestCase()
private void initTest(org.picocontainer.ComponentAdapter componentAdapter)
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testRaceConditionIsHandledBySynchronizedComponentAdapter()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testRaceConditionIsNotHandledWithoutSynchronizedComponentAdapter()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void THIS_NATURALLY_FAILS_testSingletonCreationRace()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void THIS_NATURALLY_FAILS_testSingletonCreationWithSynchronizedAdapter()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testSingletonCreationWithSynchronizedAdapterAndDoubleLocking()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testSingletonCreationWithSynchronizedAdapterOutside()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testSingletonCreationWithSynchronizedAdapterOutsideUsingFactory()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionprivate void runConcurrencyTest(org.picocontainer.defaults.DefaultPicoContainer pico)
throws java.lang.InterruptedException
java.lang.InterruptedException