Moved testRetain_maintainMessage_againstClientDestruction from custome API to Fuse's

This commit is contained in:
andrea
2013-08-28 22:15:11 +02:00
parent 8c04526c62
commit f46cce493f
@@ -158,6 +158,22 @@ public class ServerIntegrationFuseTest {
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
public void testPublishWithQoS1() throws Exception {
m_connection = m_mqtt.blockingConnection();