From 0eb0a11b1206e89e8c61dfb8e5870bbbf5f8f521 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 5 Jul 2015 22:22:00 +0200 Subject: [PATCH] Fix fake TCP server test --- src/test/java/net/pterodactylus/fcp/fake/FakeTcpServerTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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")); -- 2.7.4