diff --git a/src/test/java/org/jboss/netty/handler/ssl/AbstractSocketSslEchoTest.java b/src/test/java/org/jboss/netty/handler/ssl/AbstractSocketSslEchoTest.java index 2fd47c2447..dee3b3361d 100644 --- a/src/test/java/org/jboss/netty/handler/ssl/AbstractSocketSslEchoTest.java +++ b/src/test/java/org/jboss/netty/handler/ssl/AbstractSocketSslEchoTest.java @@ -148,7 +148,12 @@ public abstract class AbstractSocketSslEchoTest { int port = ((InetSocketAddress) sc.getLocalAddress()).getPort(); ChannelFuture ccf = cb.connect(new InetSocketAddress(InetAddress.getLocalHost(), port)); - assertTrue(ccf.awaitUninterruptibly().isSuccess()); + ccf.awaitUninterruptibly(); + if (!ccf.isSuccess()) { + logger.error("Connection attempt failed", ccf.getCause()); + sc.close().awaitUninterruptibly(); + } + assertTrue(ccf.isSuccess()); Channel cc = ccf.getChannel(); ChannelFuture hf = cc.getPipeline().get(SslHandler.class).handshake(cc);