This closes #1563
This commit is contained in:
commit
9b4e8420d5
|
@ -118,9 +118,11 @@ import org.apache.activemq.artemis.utils.JsonLoader;
|
|||
import org.apache.activemq.artemis.utils.ListUtil;
|
||||
import org.apache.activemq.artemis.utils.SecurityFormatter;
|
||||
import org.apache.activemq.artemis.utils.collections.TypedProperties;
|
||||
import org.jboss.logging.Logger;
|
||||
|
||||
public class ActiveMQServerControlImpl extends AbstractControl implements ActiveMQServerControl, NotificationEmitter, org.apache.activemq.artemis.core.server.management.NotificationListener {
|
||||
// Constants -----------------------------------------------------
|
||||
private static final Logger logger = Logger.getLogger(ActiveMQServerControlImpl.class);
|
||||
|
||||
// Attributes ----------------------------------------------------
|
||||
|
||||
|
@ -2436,7 +2438,17 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active
|
|||
|
||||
clearIO();
|
||||
|
||||
server.fail(true);
|
||||
Thread t = new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
server.fail(true);
|
||||
} catch (Throwable e) {
|
||||
logger.warn(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
};
|
||||
t.start();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -941,7 +941,7 @@ public class ActiveMQServerImpl implements ActiveMQServer {
|
|||
|
||||
@Override
|
||||
public final void fail(boolean failoverOnServerShutdown) throws Exception {
|
||||
stop(failoverOnServerShutdown, false, false, false);
|
||||
stop(failoverOnServerShutdown, false, false, true);
|
||||
}
|
||||
|
||||
public final void stop(boolean failoverOnServerShutdown, boolean isExit) throws Exception {
|
||||
|
|
|
@ -1023,6 +1023,7 @@ public class ActiveMQServerControlTest extends ManagementTestBase {
|
|||
fail(e.getMessage());
|
||||
}
|
||||
}
|
||||
Wait.waitFor(() -> !server.isStarted());
|
||||
assertFalse(server.isStarted());
|
||||
}
|
||||
|
||||
|
|
|
@ -48,13 +48,6 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes
|
|||
}
|
||||
|
||||
|
||||
// it doesn't make sense through the core
|
||||
// the pool will be shutdown while a connection is being used
|
||||
// makes no sense!
|
||||
@Override
|
||||
public void testForceFailover() throws Exception {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected ActiveMQServerControl createManagementControl() throws Exception {
|
||||
|
|
Loading…
Reference in New Issue