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 {
|
public void testSubscribe() throws Exception {
|
||||||
// startServer();
|
// startServer();
|
||||||
MQTT mqtt = new MQTT();
|
MQTT mqtt = new MQTT();
|
||||||
@@ -61,7 +61,7 @@ public class ServerIntegrationFuseTest {
|
|||||||
connection.disconnect().await();
|
connection.disconnect().await();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore
|
@Test
|
||||||
public void testPublishWithQoS1() throws Exception {
|
public void testPublishWithQoS1() throws Exception {
|
||||||
MQTT mqtt = new MQTT();
|
MQTT mqtt = new MQTT();
|
||||||
mqtt.setHost("localhost", Server.PORT);
|
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
|
@Test
|
||||||
public void testSubscribe() throws IOException, InterruptedException {
|
public void testSubscribe() throws IOException, InterruptedException {
|
||||||
// startServer();
|
// startServer();
|
||||||
|
|||||||
Reference in New Issue
Block a user