Use ephemeral port for acceptor loop test to avoid conflict.
Change-Id: Ia7a16b320ce65b6e480049c1d1116ee704567fa2
diff --git a/utils/nio/src/test/java/org/onlab/nio/AcceptorLoopTest.java b/utils/nio/src/test/java/org/onlab/nio/AcceptorLoopTest.java
index 82deb7e..130177e 100644
--- a/utils/nio/src/test/java/org/onlab/nio/AcceptorLoopTest.java
+++ b/utils/nio/src/test/java/org/onlab/nio/AcceptorLoopTest.java
@@ -31,9 +31,9 @@
*/
public class AcceptorLoopTest extends AbstractLoopTest {
- private static final int PORT = 9876;
+ private static final int PICK_EPHEMERAL = 0;
- private static final SocketAddress SOCK_ADDR = new InetSocketAddress("127.0.0.1", PORT);
+ private static final SocketAddress SOCK_ADDR = new InetSocketAddress("127.0.0.1", PICK_EPHEMERAL);
private static class MyAcceptLoop extends AcceptorLoop {
private final CountDownLatch loopStarted = new CountDownLatch(1);
@@ -73,7 +73,6 @@
}
@Test
-// @Ignore("Doesn't shut down the socket")
public void basic() throws IOException {
MyAcceptLoop myAccLoop = new MyAcceptLoop();
AcceptorLoop accLoop = myAccLoop;