From: David ‘Bombe’ Roden Date: Wed, 1 Jul 2015 19:27:44 +0000 (+0200) Subject: Close FCP server after each test X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=6f0894c9ca237aa0da462b6a228ffd7957393b7f;p=jFCPlib.git Close FCP server after each test --- 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();