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.option(ChannelOption.ALLOW_HALF_CLOSURE, halfClosure);
|
||||
ChannelFuture future = cb.connect(NetUtil.LOCALHOST, TestUtils.getFreePort()).awaitUninterruptibly();
|
||||
assertTrue(future.cause() instanceof ConnectException);
|
||||
assertNull(errorPromise.cause());
|
||||
assertThat(future.cause(), is(instanceOf(ConnectException.class)));
|
||||
assertThat(errorPromise.cause(), is(nullValue()));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user