This commit is contained in:
Justin Bertram 2017-10-03 11:56:54 -05:00
commit 49e4f0941b
2 changed files with 10 additions and 8 deletions

View File

@ -125,7 +125,7 @@ public class ProtonServerReceiverContext extends ProtonInitializable implements
} catch (ActiveMQAMQPNotFoundException e) {
throw e;
} catch (Exception e) {
e.printStackTrace();
log.debug(e.getMessage(), e);
throw new ActiveMQAMQPInternalErrorException(e.getMessage(), e);
}

View File

@ -1135,6 +1135,14 @@ public class MQTTTest extends MQTTTestSupport {
@Test(timeout = 60 * 1000)
public void testLinkRouteAmqpReceiveMQTT() throws Exception {
MQTT mqtt = createMQTTConnection();
mqtt.setClientId("TestClient");
BlockingConnection blockingConnection = mqtt.blockingConnection();
blockingConnection.connect();
Topic t = new Topic("test", QoS.AT_LEAST_ONCE);
blockingConnection.subscribe(new Topic[]{t});
AmqpClient client = new AmqpClient(new URI(AMQP_URI), null, null);
AmqpConnection connection = client.connect();
@ -1149,13 +1157,8 @@ public class MQTTTest extends MQTTTestSupport {
connection.close();
}
MQTT mqtt = createMQTTConnection();
mqtt.setClientId("TestClient");
BlockingConnection blockingConnection = mqtt.blockingConnection();
try {
blockingConnection.connect();
Topic t = new Topic("test", QoS.AT_LEAST_ONCE);
blockingConnection.subscribe(new Topic[] {t});
blockingConnection.subscribe(new Topic[]{t});
assertNotNull(blockingConnection.receive(5, TimeUnit.SECONDS));
} finally {
blockingConnection.kill();
@ -1900,7 +1903,6 @@ public class MQTTTest extends MQTTTestSupport {
getServer().waitForActivation(10, TimeUnit.SECONDS);
}
}
@Test