Repository: activemq Updated Branches: refs/heads/trunk ccf4b9f34 -> d4a376d88
added/updated timeouts to help resolve CI failures Project: http://git-wip-us.apache.org/repos/asf/activemq/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/d4a376d8 Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/d4a376d8 Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/d4a376d8 Branch: refs/heads/trunk Commit: d4a376d8859fa3578746d198ec17d9ad00307b55 Parents: ccf4b9f Author: Kevin Earls <[email protected]> Authored: Wed Jul 9 16:24:03 2014 +0200 Committer: Kevin Earls <[email protected]> Committed: Wed Jul 9 16:24:03 2014 +0200 ---------------------------------------------------------------------- .../activemq/transport/mqtt/MQTTNioTest.java | 19 +++++++++++++++++-- .../apache/activemq/transport/mqtt/MQTTTest.java | 10 +++++----- 2 files changed, 22 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq/blob/d4a376d8/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTNioTest.java ---------------------------------------------------------------------- diff --git a/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTNioTest.java b/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTNioTest.java index 2513ac3..7104e41 100644 --- a/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTNioTest.java +++ b/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTNioTest.java @@ -30,19 +30,34 @@ import org.apache.activemq.security.SimpleAuthenticationPlugin; import org.apache.activemq.util.Wait; import org.fusesource.mqtt.client.BlockingConnection; import org.fusesource.mqtt.client.MQTT; +import org.junit.Before; +import org.junit.Rule; import org.junit.Test; +import org.junit.rules.TestName; import org.junit.runner.RunWith; import org.junit.runners.BlockJUnit4ClassRunner; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; @RunWith(BlockJUnit4ClassRunner.class) 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 protected String getProtocolScheme() { return "mqtt+nio"; } - @Test + @Test(timeout = 60 * 1000) public void testPingOnMQTTNIO() throws Exception { addMQTTConnector("maxInactivityDuration=-1"); brokerService.start(); @@ -62,7 +77,7 @@ public class MQTTNioTest extends MQTTTest { connection.disconnect(); } - @Test + @Test(timeout = 60 * 1000) public void testAnonymousUserConnect() throws Exception { addMQTTConnector(); configureAuthentication(brokerService); http://git-wip-us.apache.org/repos/asf/activemq/blob/d4a376d8/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTTest.java ---------------------------------------------------------------------- diff --git a/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTTest.java b/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTTest.java index 466e6a6..c7bc7d5 100644 --- a/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTTest.java +++ b/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTTest.java @@ -187,7 +187,7 @@ public class MQTTTest extends AbstractMQTTTest { provider.disconnect(); } - @Test(timeout = 60 * 1000) + @Test(timeout = 2 * 60 * 1000) public void testSendAtLeastOnceReceiveExactlyOnce() throws Exception { addMQTTConnector(); brokerService.start(); @@ -205,7 +205,7 @@ public class MQTTTest extends AbstractMQTTTest { provider.disconnect(); } - @Test(timeout = 60 * 1000) + @Test(timeout = 2 * 60 * 1000) public void testSendAtLeastOnceReceiveAtMostOnce() throws Exception { addMQTTConnector(); brokerService.start(); @@ -241,7 +241,7 @@ public class MQTTTest extends AbstractMQTTTest { provider.disconnect(); } - @Test(timeout = 60 * 1000) + @Test(timeout = 2 * 60 * 1000) public void testSendAndReceiveAtLeastOnce() throws Exception { addMQTTConnector(); brokerService.start(); @@ -360,7 +360,7 @@ public class MQTTTest extends AbstractMQTTTest { connection.disconnect(); } - @Test(timeout = 60 * 1000) + @Test(timeout = 2 * 60 * 1000) public void testMQTTPathPatterns() throws Exception { addMQTTConnector(); brokerService.start(); @@ -1065,7 +1065,7 @@ public class MQTTTest extends AbstractMQTTTest { provider.disconnect(); } - @Test(timeout = 60 * 1000) + @Test(timeout = 2 * 60 * 1000) public void testSendJMSReceiveMQTT() throws Exception { addMQTTConnector(); TransportConnector openwireTransport = brokerService.addConnector("tcp://localhost:0");
