summaryrefslogtreecommitdiff
path: root/qpid/java
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2009-10-05 14:59:46 +0000
committerMartin Ritchie <ritchiem@apache.org>2009-10-05 14:59:46 +0000
commit473a49492a878055d7ab81ffaf5c472e85fb892d (patch)
tree58075c47d214941ddc15d4c59aa6e821229997f4 /qpid/java
parenta1c6e918f40467a03a94dfc3a8e1f335ed021bcb (diff)
downloadqpid-python-473a49492a878055d7ab81ffaf5c472e85fb892d.tar.gz
Update to FBC to ensure second broker is shutdown in the event of an exception during super.tearDown. This may have been the cause of CI stuck brokers
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@821819 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/utils/FailoverBaseCase.java20
1 files changed, 18 insertions, 2 deletions
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/FailoverBaseCase.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/FailoverBaseCase.java
index 440bc31fe9..8ca65988b5 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/FailoverBaseCase.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/FailoverBaseCase.java
@@ -20,11 +20,18 @@
*/
package org.apache.qpid.test.utils;
+import org.apache.qpid.util.FileUtils;
+
import javax.jms.Connection;
public class FailoverBaseCase extends QpidTestCase
{
+<<<<<<< HEAD:qpid/java/systests/src/main/java/org/apache/qpid/test/utils/FailoverBaseCase.java
+=======
+ protected static final Logger _logger = LoggerFactory.getLogger(FailoverBaseCase.class);
+
+>>>>>>> be4ef1c... Update to FBC to ensure second broker is shutdown in the event of an exception during super.tearDown. This may have been the cause of CI stuck brokers:qpid/java/systests/src/main/java/org/apache/qpid/test/utils/FailoverBaseCase.java
public static int FAILING_VM_PORT = 2;
public static int FAILING_PORT = Integer.parseInt(System.getProperty("test.port.alt"));
@@ -74,8 +81,17 @@ public class FailoverBaseCase extends QpidTestCase
public void tearDown() throws Exception
{
- stopBroker(_broker.equals(VM)?FAILING_PORT:FAILING_PORT);
- super.tearDown();
+ try
+ {
+ super.tearDown();
+ }
+ finally
+ {
+ // Ensure we shutdown any secondary brokers, even if we are unable
+ // to cleanly tearDown the QTC.
+ stopBroker(getFailingPort());
+ FileUtils.deleteDirectory(System.getProperty("QPID_WORK", System.getProperty("java.io.tmpdir")) + "/" + getFailingPort());
+ }
}