Skip to content

Commit 1a9aebb

Browse files
Fix flaky Netty4Http3IT test suite (#20847) (#20851)
(cherry picked from commit 9ffedcf) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 3118b5d commit 1a9aebb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4HttpClient.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,7 @@ protected void initChannel(DatagramChannel ch) {
506506

507507
final ChannelHandler quicClientCodec = Http3.newQuicClientCodecBuilder()
508508
.sslContext(context)
509+
.maxIdleTimeout(60, TimeUnit.SECONDS)
509510
.initialMaxData(SETTING_HTTP_MAX_CONTENT_LENGTH.get(Settings.EMPTY).getBytes())
510511
.initialMaxStreamDataBidirectionalLocal(SETTING_H3_MAX_STREAM_LOCAL_LENGTH.get(Settings.EMPTY).getBytes())
511512
.initialMaxStreamDataBidirectionalRemote(SETTING_H3_MAX_STREAM_REMOTE_LENGTH.get(Settings.EMPTY).getBytes())
@@ -518,6 +519,7 @@ protected void initChannel(DatagramChannel ch) {
518519
@Override
519520
Channel prepare(Bootstrap clientBootstrap, Channel channel) throws InterruptedException {
520521
final QuicChannel quicChannel = QuicChannel.newBootstrap(channel)
522+
.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 30000) // 30 seconds
521523
.handler(new Http3ClientConnectionHandler())
522524
.remoteAddress(channel.remoteAddress())
523525
.connect()

0 commit comments

Comments
 (0)