From d9e22dc837d396d3e2e891bd08787572316c9560 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 12 Mar 2026 11:45:36 +0000 Subject: [PATCH] Fix flaky Netty4Http3IT test suite (#20847) (cherry picked from commit 9ffedcfb6d160b1d88e8bf6596568f0fc9230a15) Signed-off-by: github-actions[bot] --- .../test/java/org/opensearch/http/netty4/Netty4HttpClient.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4HttpClient.java b/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4HttpClient.java index 3215a202227af..becbafdd3fb27 100644 --- a/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4HttpClient.java +++ b/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4HttpClient.java @@ -506,6 +506,7 @@ protected void initChannel(DatagramChannel ch) { final ChannelHandler quicClientCodec = Http3.newQuicClientCodecBuilder() .sslContext(context) + .maxIdleTimeout(60, TimeUnit.SECONDS) .initialMaxData(SETTING_HTTP_MAX_CONTENT_LENGTH.get(Settings.EMPTY).getBytes()) .initialMaxStreamDataBidirectionalLocal(SETTING_H3_MAX_STREAM_LOCAL_LENGTH.get(Settings.EMPTY).getBytes()) .initialMaxStreamDataBidirectionalRemote(SETTING_H3_MAX_STREAM_REMOTE_LENGTH.get(Settings.EMPTY).getBytes()) @@ -518,6 +519,7 @@ protected void initChannel(DatagramChannel ch) { @Override Channel prepare(Bootstrap clientBootstrap, Channel channel) throws InterruptedException { final QuicChannel quicChannel = QuicChannel.newBootstrap(channel) + .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 30000) // 30 seconds .handler(new Http3ClientConnectionHandler()) .remoteAddress(channel.remoteAddress()) .connect()