Shut down core after the test.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 17 Nov 2014 21:15:30 +0000 (22:15 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 17 Nov 2014 21:15:30 +0000 (22:15 +0100)
src/test/java/net/pterodactylus/xdcc/core/CoreTest.java

index 4ae2b0f..b6de4a9 100644 (file)
@@ -13,6 +13,7 @@ import net.pterodactylus.xdcc.data.Channel;
 import net.pterodactylus.xdcc.data.Network;
 
 import com.google.common.eventbus.EventBus;
+import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -39,6 +40,11 @@ public class CoreTest {
                when(connectionFactory.createConnection("second.net", 6667)).thenReturn(secondConnection);
        }
 
+       @After
+       public void tearDown() {
+               core.stopAndWait();
+       }
+
        @Test
        public void startingTheCoreConnectsToConfiguredNetworks() {
                Network firstNetwork = Network.builder("FirstNet")