Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky tests #4947

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import io.netty.channel.ChannelDuplexHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.ServerSocketChannel;
Expand Down Expand Up @@ -59,6 +60,7 @@
import software.amazon.awssdk.core.ResponseInputStream;
import software.amazon.awssdk.core.async.AsyncResponseTransformer;
import software.amazon.awssdk.core.retry.RetryPolicy;
import software.amazon.awssdk.http.nio.netty.NettyNioAsyncHttpClient;
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.services.protocolrestjson.ProtocolRestJsonAsyncClient;
import software.amazon.awssdk.services.protocolrestjson.model.StreamingOutputOperationRequest;
Expand Down Expand Up @@ -88,6 +90,7 @@ void setUpPerTest() throws Exception {
.credentialsProvider(AnonymousCredentialsProvider.create())
.endpointOverride(URI.create("http://localhost:" + server.port()))
.overrideConfiguration(o -> o.retryPolicy(RetryPolicy.none()))
.httpClientBuilder(NettyNioAsyncHttpClient.builder().putChannelOption(ChannelOption.SO_RCVBUF, 8))
.build();
}

Expand Down Expand Up @@ -138,7 +141,7 @@ void verifyConnection(Consumer<ResponseInputStream<StreamingOutputOperationRespo

private static class Server extends ChannelInitializer<Channel> {
private static final byte[] CONTENT = ("{ "
+ "\"foo\": " + RandomStringUtils.randomAscii(1024)
+ "\"foo\": " + RandomStringUtils.randomAscii(1024 * 1024 * 10)
+ "}").getBytes(StandardCharsets.UTF_8);
private ServerBootstrap bootstrap;
private ServerSocketChannel serverSock;
Expand Down
Loading