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
311532feb0
commit
5d11be58ea
@ -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