Use ephemeral port for acceptor loop test to avoid conflict.
Change-Id: Ia7a16b320ce65b6e480049c1d1116ee704567fa2
Showing
1 changed file
with
2 additions
and
3 deletions
... | @@ -31,9 +31,9 @@ import static org.onlab.junit.TestTools.delay; | ... | @@ -31,9 +31,9 @@ import static org.onlab.junit.TestTools.delay; |
31 | */ | 31 | */ |
32 | public class AcceptorLoopTest extends AbstractLoopTest { | 32 | public class AcceptorLoopTest extends AbstractLoopTest { |
33 | 33 | ||
34 | - private static final int PORT = 9876; | 34 | + private static final int PICK_EPHEMERAL = 0; |
35 | 35 | ||
36 | - private static final SocketAddress SOCK_ADDR = new InetSocketAddress("127.0.0.1", PORT); | 36 | + private static final SocketAddress SOCK_ADDR = new InetSocketAddress("127.0.0.1", PICK_EPHEMERAL); |
37 | 37 | ||
38 | private static class MyAcceptLoop extends AcceptorLoop { | 38 | private static class MyAcceptLoop extends AcceptorLoop { |
39 | private final CountDownLatch loopStarted = new CountDownLatch(1); | 39 | private final CountDownLatch loopStarted = new CountDownLatch(1); |
... | @@ -73,7 +73,6 @@ public class AcceptorLoopTest extends AbstractLoopTest { | ... | @@ -73,7 +73,6 @@ public class AcceptorLoopTest extends AbstractLoopTest { |
73 | } | 73 | } |
74 | 74 | ||
75 | @Test | 75 | @Test |
76 | -// @Ignore("Doesn't shut down the socket") | ||
77 | public void basic() throws IOException { | 76 | public void basic() throws IOException { |
78 | MyAcceptLoop myAccLoop = new MyAcceptLoop(); | 77 | MyAcceptLoop myAccLoop = new MyAcceptLoop(); |
79 | AcceptorLoop accLoop = myAccLoop; | 78 | AcceptorLoop accLoop = myAccLoop; | ... | ... |
-
Please register or login to post a comment