More meaningful assertion failure message
We see sporadic failure in EpollSocketConnectionAttemptTest. Generate more useful failure message using hamcrest to know more.
This commit is contained in:
parent
c72082ea7f
commit
86a7c6d9ee
@ -97,8 +97,8 @@ public class SocketConnectionAttemptTest extends AbstractClientSocketTest {
|
|||||||
cb.handler(handler);
|
cb.handler(handler);
|
||||||
cb.option(ChannelOption.ALLOW_HALF_CLOSURE, halfClosure);
|
cb.option(ChannelOption.ALLOW_HALF_CLOSURE, halfClosure);
|
||||||
ChannelFuture future = cb.connect(NetUtil.LOCALHOST, TestUtils.getFreePort()).awaitUninterruptibly();
|
ChannelFuture future = cb.connect(NetUtil.LOCALHOST, TestUtils.getFreePort()).awaitUninterruptibly();
|
||||||
assertTrue(future.cause() instanceof ConnectException);
|
assertThat(future.cause(), is(instanceOf(ConnectException.class)));
|
||||||
assertNull(errorPromise.cause());
|
assertThat(errorPromise.cause(), is(nullValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
Reference in New Issue
Block a user