use of software.amazon.awssdk.http.nio.netty.internal.NettyConfiguration in project flink by apache.
the class AWSGeneralUtilTest method testCreateNettyAsyncHttpClientWithDefaultsMaxPendingConnectionAcquires.
@Test
public void testCreateNettyAsyncHttpClientWithDefaultsMaxPendingConnectionAcquires() 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.maxPendingConnectionAcquires(), nettyConfiguration.maxPendingConnectionAcquires());
}
use of software.amazon.awssdk.http.nio.netty.internal.NettyConfiguration in project flink by apache.
the class AWSGeneralUtilTest method testCreateNettyAsyncHttpClientWithDefaultsMaxConnections.
@Test
public void testCreateNettyAsyncHttpClientWithDefaultsMaxConnections() throws Exception {
NettyNioAsyncHttpClient.Builder builder = NettyNioAsyncHttpClient.builder();
SdkAsyncHttpClient httpClient = AWSGeneralUtil.createAsyncHttpClient(builder);
NettyConfiguration nettyConfiguration = TestUtil.getNettyConfiguration(httpClient);
assertEquals(10_000, nettyConfiguration.maxConnections());
}
use of software.amazon.awssdk.http.nio.netty.internal.NettyConfiguration in project flink by apache.
the class AWSGeneralUtilTest method testCreateNettyAsyncHttpClientTrustAllCertificates.
@Test
public void testCreateNettyAsyncHttpClientTrustAllCertificates() throws Exception {
boolean trustAllCertificates = true;
AttributeMap clientConfiguration = AttributeMap.builder().put(SdkHttpConfigurationOption.TRUST_ALL_CERTIFICATES, trustAllCertificates).build();
NettyNioAsyncHttpClient.Builder builder = NettyNioAsyncHttpClient.builder();
SdkAsyncHttpClient httpClient = AWSGeneralUtil.createAsyncHttpClient(clientConfiguration, builder);
NettyConfiguration nettyConfiguration = TestUtil.getNettyConfiguration(httpClient);
assertEquals(trustAllCertificates, nettyConfiguration.trustAllCertificates());
}
use of software.amazon.awssdk.http.nio.netty.internal.NettyConfiguration in project flink by apache.
the class AWSGeneralUtilTest method testCreateNettyAsyncHttpClientWithDefaultsConnectionAcquireTimeout.
@Test
public void testCreateNettyAsyncHttpClientWithDefaultsConnectionAcquireTimeout() throws Exception {
NettyNioAsyncHttpClient.Builder builder = NettyNioAsyncHttpClient.builder();
SdkAsyncHttpClient httpClient = AWSGeneralUtil.createAsyncHttpClient(builder);
NettyConfiguration nettyConfiguration = TestUtil.getNettyConfiguration(httpClient);
assertEquals(60_000, nettyConfiguration.connectionAcquireTimeoutMillis());
}
use of software.amazon.awssdk.http.nio.netty.internal.NettyConfiguration in project flink by apache.
the class AWSGeneralUtilTest method testCreateNettyAsyncHttpClientWithPropertyTrustAllCertificates.
@Test
public void testCreateNettyAsyncHttpClientWithPropertyTrustAllCertificates() throws Exception {
boolean trustAllCerts = true;
Properties properties = new Properties();
properties.setProperty(AWSConfigConstants.TRUST_ALL_CERTIFICATES, String.valueOf(trustAllCerts));
SdkAsyncHttpClient httpClient = AWSGeneralUtil.createAsyncHttpClient(properties);
NettyConfiguration nettyConfiguration = TestUtil.getNettyConfiguration(httpClient);
assertEquals(trustAllCerts, nettyConfiguration.trustAllCertificates());
}
Aggregations