add lib-plugin interaction implementations on library side
[openflowjava.git] / openflow-protocol-impl / src / test / java / org / opendaylight / openflowjava / protocol / impl / core / TcpHandlerTest.java
index 47b2a33415b56564ccea9bfb0be73a071fc8fc63..f06f0804ba5b22756f4ff7fe79612a7700baf641 100644 (file)
@@ -45,7 +45,7 @@ public class TcpHandlerTest {
     @Before
     public void setUp() throws InterruptedException, ExecutionException {
         tcphandler = new TcpHandler(0);
-        tcphandler.start();
+        new Thread(tcphandler).start();
         tcphandler.getIsOnlineFuture().get();
         port = tcphandler.getPort();
         address = tcphandler.getAddress();
@@ -53,10 +53,12 @@ public class TcpHandlerTest {
     
     /**
      * stop {@link TcpHandler}
+     * @throws ExecutionException 
+     * @throws InterruptedException 
      */
     @After
-    public void tearDown() {
-        tcphandler.shutdown();
+    public void tearDown() throws InterruptedException, ExecutionException {
+        tcphandler.shutdown().get();
     }
 
     /**