activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject [2/2] activemq git commit: https://issues.apache.org/jira/browse/AMQ-6065 - ensure no call to exit. fix mock test to account for extra call
Date Mon, 30 Nov 2015 13:25:48 GMT
https://issues.apache.org/jira/browse/AMQ-6065 - ensure no call to exit. fix mock test to account
for extra call


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/f09000d1
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/f09000d1
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/f09000d1

Branch: refs/heads/master
Commit: f09000d1e61a0131ee20df22b7b2ac6d297ebd07
Parents: 1bef4de
Author: gtully <gary.tully@gmail.com>
Authored: Mon Nov 30 13:01:19 2015 +0000
Committer: gtully <gary.tully@gmail.com>
Committed: Mon Nov 30 13:24:19 2015 +0000

----------------------------------------------------------------------
 .../org/apache/activemq/util/DefaultIOExceptionHandlerTest.java    | 2 ++
 .../activemq/store/jdbc/JDBCIOExceptionHandlerMockeryTest.java     | 1 +
 2 files changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/f09000d1/activemq-broker/src/test/java/org/apache/activemq/util/DefaultIOExceptionHandlerTest.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/test/java/org/apache/activemq/util/DefaultIOExceptionHandlerTest.java
b/activemq-broker/src/test/java/org/apache/activemq/util/DefaultIOExceptionHandlerTest.java
index a9e2070..ea46809 100644
--- a/activemq-broker/src/test/java/org/apache/activemq/util/DefaultIOExceptionHandlerTest.java
+++ b/activemq-broker/src/test/java/org/apache/activemq/util/DefaultIOExceptionHandlerTest.java
@@ -52,6 +52,8 @@ public class DefaultIOExceptionHandlerTest {
             public void stop() throws Exception {
                 shutdownOnExitSet.set(isSystemExitOnShutdown());
                 stopCalled.countDown();
+                // ensure we don't actually exit the jvm
+                setSystemExitOnShutdown(false);
                 super.stop();
             }
         });

http://git-wip-us.apache.org/repos/asf/activemq/blob/f09000d1/activemq-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCIOExceptionHandlerMockeryTest.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCIOExceptionHandlerMockeryTest.java
b/activemq-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCIOExceptionHandlerMockeryTest.java
index 39ebf50..08d568d 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCIOExceptionHandlerMockeryTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCIOExceptionHandlerMockeryTest.java
@@ -67,6 +67,7 @@ public class JDBCIOExceptionHandlerMockeryTest {
         context.checking(new Expectations() {{
             allowing(brokerService).isRestartAllowed();
             will(returnValue(false));
+            allowing(brokerService).setSystemExitOnShutdown(with(false));
             allowing(brokerService).stopAllConnectors(with(any(ServiceStopper.class)));
             allowing(brokerService).getPersistenceAdapter();
             will(returnValue(jdbcPersistenceAdapter));


Mime
View raw message