Skip to content

Commit 72bd1f2

Browse files
committed
Improve test
1 parent 5f99b55 commit 72bd1f2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

vertx-core/src/test/java/io/vertx/tests/http/Http2MYRServerTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public void onGoAwayRead(ChannelHandlerContext ctx, int lastStreamId, long error
166166
ch.pipeline().addLast(new ChannelDuplexHandler() {
167167
@Override
168168
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
169-
if (cause instanceof IOException && cause.getMessage().equals("Connection reset by peer")) {
169+
if (cause instanceof IOException && cause.getMessage().startsWith("Connection reset")) {
170170
goAway.complete(false);
171171
} else {
172172
goAway.completeExceptionally(cause);
@@ -205,6 +205,7 @@ public ChannelFuture connect(int port, String host, BiConsumer<ChannelHandlerCon
205205
if (goAway.get(20, TimeUnit.SECONDS)) {
206206
assertEquals(receivedRstFrames.get(), maxRstFramePerWindow + 1);
207207
} else {
208+
// Mitigate CI behavior
208209
assertTrue(receivedRstFrames.get() < maxRstFramePerWindow + 1);
209210
}
210211

0 commit comments

Comments
 (0)