Moved testRetain_maintainMessage_againstClientDestruction from custome API to Fuse's
This commit is contained in:
@@ -158,6 +158,22 @@ public class ServerIntegrationFuseTest {
|
|||||||
assertEquals("/topic", msg.getTopic());
|
assertEquals("/topic", msg.getTopic());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testRetain_maintainMessage_againstClientDestruction() throws Exception {
|
||||||
|
m_connection = m_mqtt.blockingConnection();
|
||||||
|
m_connection.connect();
|
||||||
|
m_connection.publish("/topic", "Test my payload".getBytes(), QoS.AT_MOST_ONCE, true);
|
||||||
|
m_connection.disconnect();
|
||||||
|
|
||||||
|
BlockingConnection anotherConnection = m_mqtt.blockingConnection();
|
||||||
|
anotherConnection.connect();
|
||||||
|
anotherConnection.subscribe(new Topic[] {new Topic("/topic", QoS.AT_MOST_ONCE)});
|
||||||
|
Message msg = anotherConnection.receive();
|
||||||
|
msg.ack();
|
||||||
|
|
||||||
|
assertEquals("/topic", msg.getTopic());
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testPublishWithQoS1() throws Exception {
|
public void testPublishWithQoS1() throws Exception {
|
||||||
m_connection = m_mqtt.blockingConnection();
|
m_connection = m_mqtt.blockingConnection();
|
||||||
|
|||||||
Reference in New Issue
Block a user