Re-enabled ignored test, moved from ServerIntegrationTests
This commit is contained in:
@@ -42,7 +42,7 @@ public class ServerIntegrationFuseTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Ignore
|
||||
@Test
|
||||
public void testSubscribe() throws Exception {
|
||||
// startServer();
|
||||
MQTT mqtt = new MQTT();
|
||||
@@ -61,7 +61,7 @@ public class ServerIntegrationFuseTest {
|
||||
connection.disconnect().await();
|
||||
}
|
||||
|
||||
@Ignore
|
||||
@Test
|
||||
public void testPublishWithQoS1() throws Exception {
|
||||
MQTT mqtt = new MQTT();
|
||||
mqtt.setHost("localhost", Server.PORT);
|
||||
|
||||
@@ -42,26 +42,6 @@ public class ServerIntegrationTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSubscribe_FSClient() throws Exception {
|
||||
// startServer();
|
||||
MQTT mqtt = new MQTT();
|
||||
mqtt.setHost("localhost", Server.PORT);
|
||||
mqtt.setClientId("TestClient");
|
||||
FutureConnection connection = mqtt.futureConnection();
|
||||
connection.connect().await();
|
||||
|
||||
Topic[] topics = {new Topic("/topic", QoS.AT_MOST_ONCE)};
|
||||
Future<byte[]> futSub = connection.subscribe(topics);
|
||||
|
||||
connection.publish("/topic", "Test my payload".getBytes(), QoS.AT_MOST_ONCE, false).await();
|
||||
|
||||
byte[] qoses = futSub.await();
|
||||
assertEquals(1, qoses.length);
|
||||
connection.disconnect().await();
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testSubscribe() throws IOException, InterruptedException {
|
||||
// startServer();
|
||||
|
||||
Reference in New Issue
Block a user