use of software.amazon.awssdk.http.nio.netty.internal.NettyConfiguration in project flink by apache.
the class AWSGeneralUtilTest method testCreateNettyAsyncHttpClientWithDefaultsTrustAllCertificates.
@Test
public void testCreateNettyAsyncHttpClientWithDefaultsTrustAllCertificates() throws Exception {
NettyNioAsyncHttpClient.Builder builder = NettyNioAsyncHttpClient.builder();
SdkAsyncHttpClient httpClient = AWSGeneralUtil.createAsyncHttpClient(builder);
NettyConfiguration nettyConfiguration = TestUtil.getNettyConfiguration(httpClient);
assertEquals(false, nettyConfiguration.trustAllCertificates());
}
use of software.amazon.awssdk.http.nio.netty.internal.NettyConfiguration in project flink by apache.
the class AWSGeneralUtilTest method testCreateNettyAsyncHttpClientIdleConnectionReaper.
@Test
public void testCreateNettyAsyncHttpClientIdleConnectionReaper() throws Exception {
boolean reapIdleConnections = false;
AttributeMap clientConfiguration = AttributeMap.builder().put(SdkHttpConfigurationOption.REAP_IDLE_CONNECTIONS, reapIdleConnections).build();
NettyNioAsyncHttpClient.Builder builder = NettyNioAsyncHttpClient.builder();
SdkAsyncHttpClient httpClient = AWSGeneralUtil.createAsyncHttpClient(clientConfiguration, builder);
NettyConfiguration nettyConfiguration = TestUtil.getNettyConfiguration(httpClient);
assertEquals(reapIdleConnections, nettyConfiguration.reapIdleConnections());
}
use of software.amazon.awssdk.http.nio.netty.internal.NettyConfiguration in project flink by apache.
the class AWSGeneralUtilTest method testCreateNettyAsyncHttpClientWithDefaultsTlsTrustManagersProvider.
@Test
public void testCreateNettyAsyncHttpClientWithDefaultsTlsTrustManagersProvider() 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.tlsTrustManagersProvider(), nettyConfiguration.tlsTrustManagersProvider());
}
use of software.amazon.awssdk.http.nio.netty.internal.NettyConfiguration in project flink by apache.
the class AWSGeneralUtilTest method testCreateNettyAsyncHttpClientIdleConnectionTtl.
@Test
public void testCreateNettyAsyncHttpClientIdleConnectionTtl() throws Exception {
Duration connectionTtl = Duration.ofMillis(5000);
AttributeMap clientConfiguration = AttributeMap.builder().put(SdkHttpConfigurationOption.CONNECTION_TIME_TO_LIVE, connectionTtl).build();
NettyNioAsyncHttpClient.Builder builder = NettyNioAsyncHttpClient.builder();
SdkAsyncHttpClient httpClient = AWSGeneralUtil.createAsyncHttpClient(clientConfiguration, builder);
NettyConfiguration nettyConfiguration = TestUtil.getNettyConfiguration(httpClient);
assertEquals(connectionTtl.toMillis(), nettyConfiguration.connectionTtlMillis());
}
use of software.amazon.awssdk.http.nio.netty.internal.NettyConfiguration in project flink by apache.
the class AWSGeneralUtilTest method testCreateNettyAsyncHttpClientWithDefaultsReadTimeout.
@Test
public void testCreateNettyAsyncHttpClientWithDefaultsReadTimeout() throws Exception {
NettyNioAsyncHttpClient.Builder builder = NettyNioAsyncHttpClient.builder();
SdkAsyncHttpClient httpClient = AWSGeneralUtil.createAsyncHttpClient(builder);
NettyConfiguration nettyConfiguration = TestUtil.getNettyConfiguration(httpClient);
assertEquals(360_000, nettyConfiguration.readTimeoutMillis());
}
Aggregations