use of software.amazon.awssdk.http.nio.netty.internal.NettyConfiguration in project flink by apache.
the class AWSGeneralUtilTest method testCreateNettyAsyncHttpClientWithDefaultsWriteTimeout.
@Test
public void testCreateNettyAsyncHttpClientWithDefaultsWriteTimeout() throws Exception {
NettyNioAsyncHttpClient.Builder builder = NettyNioAsyncHttpClient.builder();
SdkAsyncHttpClient httpClient = AWSGeneralUtil.createAsyncHttpClient(builder);
NettyConfiguration nettyConfiguration = TestUtil.getNettyConfiguration(httpClient);
SdkAsyncHttpClient httpDefaultClient = NettyNioAsyncHttpClient.create();
NettyConfiguration nettyDefaultConfiguration = TestUtil.getNettyConfiguration(httpDefaultClient);
assertEquals(nettyDefaultConfiguration.writeTimeoutMillis(), nettyConfiguration.writeTimeoutMillis());
}
use of software.amazon.awssdk.http.nio.netty.internal.NettyConfiguration in project flink by apache.
the class AWSGeneralUtilTest method testCreateNettyAsyncHttpClientMaxConcurrency.
@Test
public void testCreateNettyAsyncHttpClientMaxConcurrency() throws Exception {
int maxConnections = 123;
AttributeMap clientConfiguration = AttributeMap.builder().put(SdkHttpConfigurationOption.MAX_CONNECTIONS, maxConnections).build();
NettyNioAsyncHttpClient.Builder builder = NettyNioAsyncHttpClient.builder();
SdkAsyncHttpClient httpClient = AWSGeneralUtil.createAsyncHttpClient(clientConfiguration, builder);
NettyConfiguration nettyConfiguration = TestUtil.getNettyConfiguration(httpClient);
assertEquals(maxConnections, nettyConfiguration.maxConnections());
}
Aggregations