Skip to content

Commit

Permalink
More meaningful assertion failure message
Browse files Browse the repository at this point in the history
We see sporadic failure in EpollSocketConnectionAttemptTest. Generate
more useful failure message using hamcrest to know more.
  • Loading branch information
trustin committed Jun 4, 2015
1 parent c72082e commit 86a7c6d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ public void channelActive(ChannelHandlerContext ctx) throws Exception {
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
Expand Down

0 comments on commit 86a7c6d

Please sign in to comment.