This closes #48 forceFailover method
This commit is contained in:
commit
6babfee36a
|
@ -1928,14 +1928,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active
|
|||
|
||||
clearIO();
|
||||
|
||||
try
|
||||
{
|
||||
server.stop(true);
|
||||
}
|
||||
finally
|
||||
{
|
||||
blockOnIO();
|
||||
}
|
||||
server.stop(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -753,6 +753,7 @@ public class ActiveMQServerImpl implements ActiveMQServer
|
|||
messagingServerControl = null;
|
||||
memoryManager = null;
|
||||
backupManager = null;
|
||||
storageManager = null;
|
||||
|
||||
sessions.clear();
|
||||
|
||||
|
|
|
@ -1019,6 +1019,14 @@ public class ActiveMQServerControlTest extends ManagementTestBase
|
|||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testForceFailover() throws Exception
|
||||
{
|
||||
ActiveMQServerControl serverControl = createManagementControl();
|
||||
serverControl.forceFailover();
|
||||
assertFalse(server.isStarted());
|
||||
}
|
||||
|
||||
protected void scaleDown(ScaleDownHandler handler) throws Exception
|
||||
{
|
||||
SimpleString address = new SimpleString("testQueue");
|
||||
|
|
Loading…
Reference in New Issue