|
27 | 27 | import io.netty.channel.ChannelDuplexHandler;
|
28 | 28 | import io.netty.channel.ChannelHandlerContext;
|
29 | 29 | import io.netty.channel.ChannelInitializer;
|
| 30 | +import io.netty.channel.ChannelOption; |
30 | 31 | import io.netty.channel.ChannelPipeline;
|
31 | 32 | import io.netty.channel.nio.NioEventLoopGroup;
|
32 | 33 | import io.netty.channel.socket.ServerSocketChannel;
|
|
59 | 60 | import software.amazon.awssdk.core.ResponseInputStream;
|
60 | 61 | import software.amazon.awssdk.core.async.AsyncResponseTransformer;
|
61 | 62 | import software.amazon.awssdk.core.retry.RetryPolicy;
|
| 63 | +import software.amazon.awssdk.http.nio.netty.NettyNioAsyncHttpClient; |
62 | 64 | import software.amazon.awssdk.regions.Region;
|
63 | 65 | import software.amazon.awssdk.services.protocolrestjson.ProtocolRestJsonAsyncClient;
|
64 | 66 | import software.amazon.awssdk.services.protocolrestjson.model.StreamingOutputOperationRequest;
|
@@ -88,6 +90,7 @@ void setUpPerTest() throws Exception {
|
88 | 90 | .credentialsProvider(AnonymousCredentialsProvider.create())
|
89 | 91 | .endpointOverride(URI.create("http://localhost:" + server.port()))
|
90 | 92 | .overrideConfiguration(o -> o.retryPolicy(RetryPolicy.none()))
|
| 93 | + .httpClientBuilder(NettyNioAsyncHttpClient.builder().putChannelOption(ChannelOption.SO_RCVBUF, 8)) |
91 | 94 | .build();
|
92 | 95 | }
|
93 | 96 |
|
@@ -138,7 +141,7 @@ void verifyConnection(Consumer<ResponseInputStream<StreamingOutputOperationRespo
|
138 | 141 |
|
139 | 142 | private static class Server extends ChannelInitializer<Channel> {
|
140 | 143 | private static final byte[] CONTENT = ("{ "
|
141 |
| - + "\"foo\": " + RandomStringUtils.randomAscii(1024) |
| 144 | + + "\"foo\": " + RandomStringUtils.randomAscii(1024 * 1024 * 10) |
142 | 145 | + "}").getBytes(StandardCharsets.UTF_8);
|
143 | 146 | private ServerBootstrap bootstrap;
|
144 | 147 | private ServerSocketChannel serverSock;
|
|
0 commit comments