use of software.amazon.awssdk.http.nio.netty.internal.NettyConfiguration in project flink by apache.
the class AWSGeneralUtilTest method testCreateNettyAsyncHttpClientWriteTimeout.
@Test
public void testCreateNettyAsyncHttpClientWriteTimeout() throws Exception {
Duration writeTimeout = Duration.ofMillis(3000);
AttributeMap clientConfiguration = AttributeMap.builder().put(SdkHttpConfigurationOption.WRITE_TIMEOUT, writeTimeout).build();
NettyNioAsyncHttpClient.Builder builder = NettyNioAsyncHttpClient.builder();
SdkAsyncHttpClient httpClient = AWSGeneralUtil.createAsyncHttpClient(clientConfiguration, builder);
NettyConfiguration nettyConfiguration = TestUtil.getNettyConfiguration(httpClient);
assertEquals(writeTimeout.toMillis(), nettyConfiguration.writeTimeoutMillis());
}
use of software.amazon.awssdk.http.nio.netty.internal.NettyConfiguration in project flink by apache.
the class AWSGeneralUtilTest method testCreateNettyAsyncHttpClientWithDefaultsTlsKeyManagersProvider.
@Test
public void testCreateNettyAsyncHttpClientWithDefaultsTlsKeyManagersProvider() 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.tlsKeyManagersProvider(), nettyConfiguration.tlsKeyManagersProvider());
}
use of software.amazon.awssdk.http.nio.netty.internal.NettyConfiguration in project flink by apache.
the class AWSGeneralUtilTest method testCreateNettyAsyncHttpClientReadTimeout.
@Test
public void testCreateNettyAsyncHttpClientReadTimeout() throws Exception {
Duration readTimeout = Duration.ofMillis(1234);
AttributeMap clientConfiguration = AttributeMap.builder().put(SdkHttpConfigurationOption.READ_TIMEOUT, readTimeout).build();
NettyNioAsyncHttpClient.Builder builder = NettyNioAsyncHttpClient.builder();
SdkAsyncHttpClient httpClient = AWSGeneralUtil.createAsyncHttpClient(clientConfiguration, builder);
NettyConfiguration nettyConfiguration = TestUtil.getNettyConfiguration(httpClient);
assertEquals(readTimeout.toMillis(), nettyConfiguration.readTimeoutMillis());
}
use of software.amazon.awssdk.http.nio.netty.internal.NettyConfiguration in project flink by apache.
the class AWSGeneralUtilTest method testCreateNettyAsyncHttpClientWithDefaultsConnectionTimeout.
@Test
public void testCreateNettyAsyncHttpClientWithDefaultsConnectionTimeout() 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.connectTimeoutMillis(), nettyConfiguration.connectTimeoutMillis());
}
use of software.amazon.awssdk.http.nio.netty.internal.NettyConfiguration in project flink by apache.
the class KinesisProxyV2FactoryTest method testReadTimeoutPopulatedFromDefaults.
@Test
public void testReadTimeoutPopulatedFromDefaults() throws Exception {
Properties properties = properties();
KinesisProxyV2Interface proxy = KinesisProxyV2Factory.createKinesisProxyV2(properties);
NettyConfiguration nettyConfiguration = getNettyConfiguration(proxy);
assertEquals(DEFAULT_EFO_HTTP_CLIENT_READ_TIMEOUT.toMillis(), nettyConfiguration.readTimeoutMillis());
}
Aggregations