From 4a05e650fc2d1a3a729e2c0409d3e11963b02de8 Mon Sep 17 00:00:00 2001 From: "Rafael H. Schloming" Date: Thu, 1 May 2008 21:48:52 +0000 Subject: 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 --- .../java/org/apache/qpid/test/framework/FrameworkBaseCase.java | 7 ++++++- .../java/org/apache/qpid/test/framework/LocalCircuitFactory.java | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'java') 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 assertions, Properties testProperties) { - FrameworkBaseCase.assertNoFailures(testCircuit.test(1, assertions)); + if (testCircuit != null) + { + FrameworkBaseCase.assertNoFailures(testCircuit.test(1, assertions)); + } } /** -- cgit v1.2.1