org.picocontainer.behaviors
Class SynchronizedTestCase

java.lang.Object
  extended by org.picocontainer.behaviors.SynchronizedTestCase
Direct Known Subclasses:
LockedTestCase

public class SynchronizedTestCase
extends java.lang.Object

Author:
Thomas Heller, Aslak Hellesøy, Jörg Schaible

Nested Class Summary
 class SynchronizedTestCase.Blocker
           
static class SynchronizedTestCase.SlowCtor
           
 
Constructor Summary
SynchronizedTestCase()
           
 
Method Summary
protected  BehaviorFactory makeBehaviorFactory()
           
protected  ComponentAdapter makeComponentAdapter(ComponentAdapter componentAdapter)
           
 void testRaceConditionIsHandledBySynchronizedComponentAdapter()
           
 void testRaceConditionIsNotHandledWithoutSynchronizedComponentAdapter()
           
 void testSingletonCreationWithSynchronizedAdapterAndDoubleLocking()
           
 void testSingletonCreationWithSynchronizedAdapterOutside()
           
 void testSingletonCreationWithSynchronizedAdapterOutsideUsingFactory()
           
 void THIS_NATURALLY_FAILS_testSingletonCreationRace()
           
 void THIS_NATURALLY_FAILS_testSingletonCreationWithSynchronizedAdapter()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SynchronizedTestCase

public SynchronizedTestCase()
Method Detail

testRaceConditionIsHandledBySynchronizedComponentAdapter

public void testRaceConditionIsHandledBySynchronizedComponentAdapter()
                                                              throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

makeComponentAdapter

protected ComponentAdapter makeComponentAdapter(ComponentAdapter componentAdapter)

testRaceConditionIsNotHandledWithoutSynchronizedComponentAdapter

public void testRaceConditionIsNotHandledWithoutSynchronizedComponentAdapter()
                                                                      throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

THIS_NATURALLY_FAILS_testSingletonCreationRace

public void THIS_NATURALLY_FAILS_testSingletonCreationRace()
                                                    throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

THIS_NATURALLY_FAILS_testSingletonCreationWithSynchronizedAdapter

public void THIS_NATURALLY_FAILS_testSingletonCreationWithSynchronizedAdapter()
                                                                       throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

testSingletonCreationWithSynchronizedAdapterAndDoubleLocking

public void testSingletonCreationWithSynchronizedAdapterAndDoubleLocking()
                                                                  throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

testSingletonCreationWithSynchronizedAdapterOutside

public void testSingletonCreationWithSynchronizedAdapterOutside()
                                                         throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

testSingletonCreationWithSynchronizedAdapterOutsideUsingFactory

public void testSingletonCreationWithSynchronizedAdapterOutsideUsingFactory()
                                                                     throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

makeBehaviorFactory

protected BehaviorFactory makeBehaviorFactory()


Copyright © 2003-2011 Codehaus. All Rights Reserved.