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, toString
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
private SynchronizedComponentAdapterTestCase.Runner[] runner
private int blockerCounter
public SynchronizedComponentAdapterTestCase()
private void initTest(org.picocontainer.ComponentAdapter componentAdapter) throws java.lang.InterruptedException
java.lang.InterruptedException
public void testRaceConditionIsHandledBySynchronizedComponentAdapter() throws java.lang.InterruptedException
java.lang.InterruptedException
public void testRaceConditionIsNotHandledWithoutSynchronizedComponentAdapter() throws java.lang.InterruptedException
java.lang.InterruptedException
public void THIS_NATURALLY_FAILS_testSingletonCreationRace() throws java.lang.InterruptedException
java.lang.InterruptedException
public void THIS_NATURALLY_FAILS_testSingletonCreationWithSynchronizedAdapter() throws java.lang.InterruptedException
java.lang.InterruptedException
public void testSingletonCreationWithSynchronizedAdapterAndDoubleLocking() throws java.lang.InterruptedException
java.lang.InterruptedException
public void testSingletonCreationWithSynchronizedAdapterOutside() throws java.lang.InterruptedException
java.lang.InterruptedException
public void testSingletonCreationWithSynchronizedAdapterOutsideUsingFactory() throws java.lang.InterruptedException
java.lang.InterruptedException
private void runConcurrencyTest(org.picocontainer.defaults.DefaultPicoContainer pico) throws java.lang.InterruptedException
java.lang.InterruptedException