mirror of https://github.com/apache/activemq.git
added/updated timeouts to help resolve CI failures
This commit is contained in:
parent
ccf4b9f34f
commit
d4a376d885
|
@ -30,19 +30,34 @@ import org.apache.activemq.security.SimpleAuthenticationPlugin;
|
||||||
import org.apache.activemq.util.Wait;
|
import org.apache.activemq.util.Wait;
|
||||||
import org.fusesource.mqtt.client.BlockingConnection;
|
import org.fusesource.mqtt.client.BlockingConnection;
|
||||||
import org.fusesource.mqtt.client.MQTT;
|
import org.fusesource.mqtt.client.MQTT;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Rule;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
import org.junit.rules.TestName;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.junit.runners.BlockJUnit4ClassRunner;
|
import org.junit.runners.BlockJUnit4ClassRunner;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
@RunWith(BlockJUnit4ClassRunner.class)
|
@RunWith(BlockJUnit4ClassRunner.class)
|
||||||
public class MQTTNioTest extends MQTTTest {
|
public class MQTTNioTest extends MQTTTest {
|
||||||
|
protected static final Logger LOG = LoggerFactory.getLogger(MQTTNioTest.class);
|
||||||
|
|
||||||
|
@Rule
|
||||||
|
public TestName testname = new TestName();
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setUp() throws Exception {
|
||||||
|
super.setUp();
|
||||||
|
LOG.debug("Starting {}", testname.getMethodName());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getProtocolScheme() {
|
protected String getProtocolScheme() {
|
||||||
return "mqtt+nio";
|
return "mqtt+nio";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test(timeout = 60 * 1000)
|
||||||
public void testPingOnMQTTNIO() throws Exception {
|
public void testPingOnMQTTNIO() throws Exception {
|
||||||
addMQTTConnector("maxInactivityDuration=-1");
|
addMQTTConnector("maxInactivityDuration=-1");
|
||||||
brokerService.start();
|
brokerService.start();
|
||||||
|
@ -62,7 +77,7 @@ public class MQTTNioTest extends MQTTTest {
|
||||||
connection.disconnect();
|
connection.disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test(timeout = 60 * 1000)
|
||||||
public void testAnonymousUserConnect() throws Exception {
|
public void testAnonymousUserConnect() throws Exception {
|
||||||
addMQTTConnector();
|
addMQTTConnector();
|
||||||
configureAuthentication(brokerService);
|
configureAuthentication(brokerService);
|
||||||
|
|
|
@ -187,7 +187,7 @@ public class MQTTTest extends AbstractMQTTTest {
|
||||||
provider.disconnect();
|
provider.disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(timeout = 60 * 1000)
|
@Test(timeout = 2 * 60 * 1000)
|
||||||
public void testSendAtLeastOnceReceiveExactlyOnce() throws Exception {
|
public void testSendAtLeastOnceReceiveExactlyOnce() throws Exception {
|
||||||
addMQTTConnector();
|
addMQTTConnector();
|
||||||
brokerService.start();
|
brokerService.start();
|
||||||
|
@ -205,7 +205,7 @@ public class MQTTTest extends AbstractMQTTTest {
|
||||||
provider.disconnect();
|
provider.disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(timeout = 60 * 1000)
|
@Test(timeout = 2 * 60 * 1000)
|
||||||
public void testSendAtLeastOnceReceiveAtMostOnce() throws Exception {
|
public void testSendAtLeastOnceReceiveAtMostOnce() throws Exception {
|
||||||
addMQTTConnector();
|
addMQTTConnector();
|
||||||
brokerService.start();
|
brokerService.start();
|
||||||
|
@ -241,7 +241,7 @@ public class MQTTTest extends AbstractMQTTTest {
|
||||||
provider.disconnect();
|
provider.disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(timeout = 60 * 1000)
|
@Test(timeout = 2 * 60 * 1000)
|
||||||
public void testSendAndReceiveAtLeastOnce() throws Exception {
|
public void testSendAndReceiveAtLeastOnce() throws Exception {
|
||||||
addMQTTConnector();
|
addMQTTConnector();
|
||||||
brokerService.start();
|
brokerService.start();
|
||||||
|
@ -360,7 +360,7 @@ public class MQTTTest extends AbstractMQTTTest {
|
||||||
connection.disconnect();
|
connection.disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(timeout = 60 * 1000)
|
@Test(timeout = 2 * 60 * 1000)
|
||||||
public void testMQTTPathPatterns() throws Exception {
|
public void testMQTTPathPatterns() throws Exception {
|
||||||
addMQTTConnector();
|
addMQTTConnector();
|
||||||
brokerService.start();
|
brokerService.start();
|
||||||
|
@ -1065,7 +1065,7 @@ public class MQTTTest extends AbstractMQTTTest {
|
||||||
provider.disconnect();
|
provider.disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(timeout = 60 * 1000)
|
@Test(timeout = 2 * 60 * 1000)
|
||||||
public void testSendJMSReceiveMQTT() throws Exception {
|
public void testSendJMSReceiveMQTT() throws Exception {
|
||||||
addMQTTConnector();
|
addMQTTConnector();
|
||||||
TransportConnector openwireTransport = brokerService.addConnector("tcp://localhost:0");
|
TransportConnector openwireTransport = brokerService.addConnector("tcp://localhost:0");
|
||||||
|
|
Loading…
Reference in New Issue