ARTEMIS-3808 fix tests

This commit is contained in:
Justin Bertram 2022-05-24 10:59:26 -05:00 committed by clebertsuconic
parent b3640c9ae8
commit 3c6f42b12a
2 changed files with 14 additions and 4 deletions

View File

@ -42,6 +42,7 @@ import java.util.concurrent.atomic.AtomicLong;
import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration; import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
import org.apache.activemq.artemis.api.core.ActiveMQBuffer; import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
import org.apache.activemq.artemis.api.core.ActiveMQException;
import org.apache.activemq.artemis.api.core.ActiveMQIllegalStateException; import org.apache.activemq.artemis.api.core.ActiveMQIllegalStateException;
import org.apache.activemq.artemis.api.core.ActiveMQTimeoutException; import org.apache.activemq.artemis.api.core.ActiveMQTimeoutException;
import org.apache.activemq.artemis.api.core.JsonUtil; import org.apache.activemq.artemis.api.core.JsonUtil;
@ -4337,7 +4338,7 @@ public class ActiveMQServerControlTest extends ManagementTestBase {
ActiveMQServerControl serverControl = createManagementControl(); ActiveMQServerControl serverControl = createManagementControl();
try { try {
serverControl.restartEmbeddedWebServer(10); serverControl.restartEmbeddedWebServer(1);
fail(); fail();
} catch (ActiveMQTimeoutException e) { } catch (ActiveMQTimeoutException e) {
// expected // expected
@ -4356,10 +4357,10 @@ public class ActiveMQServerControlTest extends ManagementTestBase {
ActiveMQServerControl serverControl = createManagementControl(); ActiveMQServerControl serverControl = createManagementControl();
try { try {
serverControl.restartEmbeddedWebServer(10); serverControl.restartEmbeddedWebServer(1000);
fail(); fail();
} catch (ActiveMQIllegalStateException e) { } catch (ActiveMQException e) {
assertEquals(message, e.getMessage()); assertSame("Unexpected cause", startException, e.getCause());
} }
} }

View File

@ -45,6 +45,15 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes
public void testScaleDownWithConnector() throws Exception { public void testScaleDownWithConnector() throws Exception {
} }
// the proxy will not work on these tests, ignoring the tests
@Override
public void testRestartEmbeddedWebServerException() throws Exception {
}
@Override
public void testRestartEmbeddedWebServerTimeout() throws Exception {
}
@Override @Override