From 6f0894c9ca237aa0da462b6a228ffd7957393b7f Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 1 Jul 2015 21:27:44 +0200 Subject: [PATCH] Close FCP server after each test --- .../java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/test/java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java b/src/test/java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java index 86e7fae..affe1e9 100644 --- a/src/test/java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java +++ b/src/test/java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java @@ -12,6 +12,7 @@ import java.util.concurrent.Future; import net.pterodactylus.fcp.FcpKeyPair; import net.pterodactylus.fcp.fake.FakeTcpServer; +import org.junit.After; import org.junit.Test; /** @@ -30,6 +31,11 @@ public class DefaultFcpClientTest { fcpClient = new DefaultFcpClient(threadPool, "localhost", fcpServer.getPort(), () -> "Test", () -> "2.0"); } + @After + public void tearDown() throws IOException { + fcpServer.close(); + } + @Test public void defaultFcpClientCanGenerateKeypair() throws ExecutionException, InterruptedException, IOException { Future keyPairFuture = fcpClient.generateKeypair().execute(); -- 2.7.4