summaryrefslogtreecommitdiff
path: root/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/qpid/CauseFailureInVM.java
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/java/systests/src/main/java/org/apache/qpid/test/framework/qpid/CauseFailureInVM.java')
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/framework/qpid/CauseFailureInVM.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/qpid/CauseFailureInVM.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/qpid/CauseFailureInVM.java
index de393b9105..b4607230cc 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/qpid/CauseFailureInVM.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/qpid/CauseFailureInVM.java
@@ -50,8 +50,7 @@ public class CauseFailureInVM implements CauseFailure
// Check that the test is really using in-vm brokers.
if (!inVMTest.usingInVmBroker())
{
- throw new RuntimeException(
- "Cannot create in-vm broker failure mechanism for a test that is not using in-vm brokers.");
+ throw new RuntimeException("Cannot create in-vm broker failure mechanism for a test that is not using in-vm brokers.");
}
this.inVMTest = inVMTest;
@@ -62,9 +61,11 @@ public class CauseFailureInVM implements CauseFailure
*/
public void causeFailure()
{
- int liveBroker = inVMTest.getLiveBroker();
-
+ if (!inVMTest.usingInVmBroker())
+ {
+ throw new RuntimeException("Test is not using in-vm brokers.");
+ }
+
VmBroker.killVMBroker();
- ApplicationRegistry.remove(liveBroker);
}
}