ARTEMIS-388 fixing testsuite

(the socket.bind not being closed was preventing other tests to run successfully)
This commit is contained in:
Clebert Suconic 2016-02-09 18:59:14 -05:00
parent 5399717176
commit ece5d81e3d
1 changed files with 16 additions and 11 deletions

View File

@ -37,6 +37,7 @@ public class ActivationFailureListenerTest extends ActiveMQTestBase {
@Test
public void simpleTest() throws Exception {
Socket s = new Socket();
try {
s.bind(new InetSocketAddress("127.0.0.1", 61616));
server = createServer(false, createDefaultNettyConfig());
final CountDownLatch latch = new CountDownLatch(1);
@ -49,4 +50,8 @@ public class ActivationFailureListenerTest extends ActiveMQTestBase {
server.start();
assertTrue(latch.await(3000, TimeUnit.MILLISECONDS));
}
finally {
s.close();
}
}
}