https://issues.apache.org/jira/browse/AMQ-6065 - ensure no call to exit. fix mock test to account for extra call

This commit is contained in:
gtully 2015-11-30 13:01:19 +00:00
parent 1bef4de4dc
commit f09000d1e6
2 changed files with 3 additions and 0 deletions

View File

@ -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();
}
});

View File

@ -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));