Skip to content

Commit 35b9a2e

Browse files
committed
Debug test
1 parent e742df2 commit 35b9a2e

File tree

2 files changed

+31
-6
lines changed

2 files changed

+31
-6
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ jobs:
2929
java-version: ${{ inputs.jdk }}
3030
distribution: temurin
3131
- name: Run tests
32-
run: mvn -s .github/maven-ci-settings.xml -q clean verify -B ${{ inputs.profile }}
32+
run: mvn -s .github/maven-ci-settings.xml -q clean verify -B ${{ inputs.profile }} -Dtest=Http2MYRServerTest#testMYRMultiplex -pl vertx-core

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

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@
1313

1414
import io.netty.bootstrap.Bootstrap;
1515
import io.netty.buffer.ByteBuf;
16-
import io.netty.channel.Channel;
17-
import io.netty.channel.ChannelFuture;
18-
import io.netty.channel.ChannelHandlerContext;
19-
import io.netty.channel.ChannelInitializer;
16+
import io.netty.channel.*;
2017
import io.netty.channel.nio.NioEventLoopGroup;
2118
import io.netty.channel.socket.nio.NioSocketChannel;
2219
import io.netty.handler.codec.http2.AbstractHttp2ConnectionHandlerBuilder;
@@ -62,6 +59,7 @@ public void testMYR() throws Exception {
6259
testMYR(false);
6360
}
6461

62+
@Repeat(times = 1000)
6563
@Test
6664
public void testMYRMultiplex() throws Exception {
6765
testMYR(true);
@@ -164,6 +162,33 @@ public void onGoAwayRead(ChannelHandlerContext ctx, int lastStreamId, long error
164162
Builder clientHandlerBuilder = new Builder();
165163
Http2ConnectionHandler clientHandler = clientHandlerBuilder.build();
166164
ch.pipeline().addLast(clientHandler);
165+
ch.pipeline().addLast(new ChannelDuplexHandler() {
166+
@Override
167+
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
168+
System.out.println("GOT IT!!!!!");
169+
System.out.println("GOT IT!!!!!");
170+
System.out.println("GOT IT!!!!!");
171+
System.out.println("GOT IT!!!!!");
172+
System.out.println("GOT IT!!!!!");
173+
System.out.println("GOT IT!!!!!");
174+
System.out.println("GOT IT!!!!!");
175+
System.out.println("GOT IT!!!!!");
176+
System.out.println("GOT IT!!!!!");
177+
System.out.println("GOT IT!!!!!");
178+
System.out.println("GOT IT!!!!!");
179+
System.out.println("GOT IT!!!!!");
180+
System.out.println("GOT IT!!!!!");
181+
System.out.println("GOT IT!!!!!");
182+
System.out.println("GOT IT!!!!!");
183+
System.out.println("GOT IT!!!!!");
184+
System.out.println("GOT IT!!!!!");
185+
System.out.println("GOT IT!!!!!");
186+
System.out.println("GOT IT!!!!!");
187+
System.out.println("GOT IT!!!!!");
188+
System.out.println("GOT IT!!!!!");
189+
System.out.println("GOT IT!!!!!");
190+
}
191+
});
167192
}
168193
};
169194
}
@@ -192,7 +217,7 @@ public ChannelFuture connect(int port, String host, BiConsumer<ChannelHandlerCon
192217
chctx.flush();
193218
}).sync();
194219

195-
goAway.get(10, TimeUnit.SECONDS);
220+
goAway.get(20, TimeUnit.SECONDS);
196221

197222
// Check the number of rst frame received before getting a go away
198223
assertEquals(receivedRstFrames.get(), maxRstFramePerWindow + 1);

0 commit comments

Comments
 (0)