From: David ‘Bombe’ Roden Date: Sun, 5 Jul 2015 20:22:00 +0000 (+0200) Subject: Fix fake TCP server test X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=0eb0a11b1206e89e8c61dfb8e5870bbbf5f8f521;p=jFCPlib.git Fix fake TCP server test --- diff --git a/src/test/java/net/pterodactylus/fcp/fake/FakeTcpServerTest.java b/src/test/java/net/pterodactylus/fcp/fake/FakeTcpServerTest.java index 976dcd6..b37dbf8 100644 --- a/src/test/java/net/pterodactylus/fcp/fake/FakeTcpServerTest.java +++ b/src/test/java/net/pterodactylus/fcp/fake/FakeTcpServerTest.java @@ -45,8 +45,9 @@ public class FakeTcpServerTest { public void connectFailed(URI uri, SocketAddress sa, IOException ioe) { } }); - tcpServer.connect(); + Future connect = tcpServer.connect(); try (TextSocket clientSocket = new TextSocket(new Socket("127.0.0.1", tcpServer.getPort()))) { + connect.get(); clientSocket.writeLine("Hello"); clientSocket.writeLine("Bye"); List receivedLines = tcpServer.collectUntil(is("Bye"));