Author: rhs
Date: Thu May  1 14:48:52 2008
New Revision: 652680

URL: http://svn.apache.org/viewvc?rev=652680&view=rev
Log:
QPID-1002: applied patch from Senaka to make systests run using normal junit 
testrunner

Modified:
    
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/FrameworkBaseCase.java
    
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/LocalCircuitFactory.java

Modified: 
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/FrameworkBaseCase.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/FrameworkBaseCase.java?rev=652680&r1=652679&r2=652680&view=diff
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/FrameworkBaseCase.java
 (original)
+++ 
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/FrameworkBaseCase.java
 Thu May  1 14:48:52 2008
@@ -23,9 +23,11 @@
 import org.apache.log4j.Logger;
 import org.apache.log4j.NDC;
 
+import org.apache.qpid.server.registry.ApplicationRegistry;
 import org.apache.qpid.test.framework.BrokerLifecycleAware;
 import org.apache.qpid.test.framework.sequencers.CircuitFactory;
 
+import org.apache.qpid.client.transport.TransportConnection;
 import org.apache.qpid.junit.extensions.AsymptoticTestCase;
 import org.apache.qpid.junit.extensions.SetupTaskAware;
 import org.apache.qpid.junit.extensions.SetupTaskHandler;
@@ -54,7 +56,7 @@
     private static final Logger log = 
Logger.getLogger(FrameworkBaseCase.class);
 
     /** Holds the test sequencer to create and run test circuits with. */
-    protected CircuitFactory circuitFactory = new LocalCircuitFactory();
+    protected CircuitFactory circuitFactory = new LocalAMQPCircuitFactory();
 
     /** Used to read the tests configurable properties through. */
     protected ParsedProperties testProps;
@@ -194,6 +196,7 @@
         testProps = 
TestContextProperties.getInstance(MessagingTestConfigProperties.defaults);
 
         // Process all optional setup tasks. This may include in-vm broker 
creation, if a decorator has added it.
+        TransportConnection.createVMBroker(1);
         taskHandler.runSetupTasks();
     }
 
@@ -205,6 +208,8 @@
         NDC.pop();
 
         // Process all optional tear down tasks. This may include in-vm broker 
clean up, if a decorator has added it.
+        TransportConnection.killVMBroker(1);
+        ApplicationRegistry.remove(1);
         taskHandler.runTearDownTasks();
     }
 

Modified: 
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/LocalCircuitFactory.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/LocalCircuitFactory.java?rev=652680&r1=652679&r2=652680&view=diff
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/LocalCircuitFactory.java
 (original)
+++ 
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/LocalCircuitFactory.java
 Thu May  1 14:48:52 2008
@@ -68,7 +68,10 @@
      */
     public void sequenceTest(Circuit testCircuit, List<Assertion> assertions, 
Properties testProperties)
     {
-        FrameworkBaseCase.assertNoFailures(testCircuit.test(1, assertions));
+        if (testCircuit != null)
+        {
+           FrameworkBaseCase.assertNoFailures(testCircuit.test(1, assertions));
+        }
     }
 
     /**


Reply via email to