From 233a466dd6dca51ad07d6b997bcb74251265b248 Mon Sep 17 00:00:00 2001 From: andrea Date: Wed, 27 Nov 2013 11:21:04 +0100 Subject: [PATCH] Fixed ghost error due to bad timing in the test --- .../mqtt/moquette/server/ServerIntegrationPahoTest.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/broker/src/test/java/org/dna/mqtt/moquette/server/ServerIntegrationPahoTest.java b/broker/src/test/java/org/dna/mqtt/moquette/server/ServerIntegrationPahoTest.java index 6b21a34c..fc971ac6 100644 --- a/broker/src/test/java/org/dna/mqtt/moquette/server/ServerIntegrationPahoTest.java +++ b/broker/src/test/java/org/dna/mqtt/moquette/server/ServerIntegrationPahoTest.java @@ -318,14 +318,13 @@ public class ServerIntegrationPahoTest { //publish a QoS 1 message another client publish a message on the topic publishFromAnotherClient("/topic", "Hello MQTT".getBytes(), 2); - + m_callback.reinit(); m_client.connect(options); - + assertEquals("Hello MQTT", m_callback.getMessage().toString()); assertEquals(2, m_callback.getMessage().getQos()); } - //BUG @Test public void testPublishReceiveWithQoS2() throws Exception { LOG.info("*** testPublishReceiveWithQoS2 ***"); @@ -337,9 +336,9 @@ public class ServerIntegrationPahoTest { //publish a QoS 1 message another client publish a message on the topic publishFromAnotherClient("/topic", "Hello MQTT".getBytes(), 2); - + m_callback.reinit(); m_client.connect(options); - + assertNotNull(m_callback); assertNotNull(m_callback.getMessage()); assertEquals("Hello MQTT", m_callback.getMessage().toString());