summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2008-05-01 21:48:52 +0000
committerRafael H. Schloming <rhs@apache.org>2008-05-01 21:48:52 +0000
commit4a05e650fc2d1a3a729e2c0409d3e11963b02de8 (patch)
tree2e8f472da8040522d63e101e7bbb845a0d42fdc3
parent7317bbd994a7421e6ae27c8045e655f606557546 (diff)
downloadqpid-python-4a05e650fc2d1a3a729e2c0409d3e11963b02de8.tar.gz
QPID-1002: applied patch from Senaka to make systests run using normal junit testrunner
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@652680 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/framework/FrameworkBaseCase.java7
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/framework/LocalCircuitFactory.java5
2 files changed, 10 insertions, 2 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/test/framework/FrameworkBaseCase.java b/java/systests/src/main/java/org/apache/qpid/test/framework/FrameworkBaseCase.java
index 51b053d2b2..1050baaca6 100644
--- a/java/systests/src/main/java/org/apache/qpid/test/framework/FrameworkBaseCase.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/framework/FrameworkBaseCase.java
@@ -23,9 +23,11 @@ package org.apache.qpid.test.framework;
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 @@ public class FrameworkBaseCase extends AsymptoticTestCase implements FrameworkTe
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 @@ public class FrameworkBaseCase extends AsymptoticTestCase implements FrameworkTe
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 @@ public class FrameworkBaseCase extends AsymptoticTestCase implements FrameworkTe
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();
}
diff --git a/java/systests/src/main/java/org/apache/qpid/test/framework/LocalCircuitFactory.java b/java/systests/src/main/java/org/apache/qpid/test/framework/LocalCircuitFactory.java
index 68aad6ee47..84dd735d0d 100644
--- a/java/systests/src/main/java/org/apache/qpid/test/framework/LocalCircuitFactory.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/framework/LocalCircuitFactory.java
@@ -68,7 +68,10 @@ public class LocalCircuitFactory implements CircuitFactory
*/
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));
+ }
}
/**