use of software.amazon.awssdk.http.nio.netty.internal.NettyConfiguration in project flink by apache.
the class KinesisProxyV2FactoryTest method testReadTimeoutPopulatedFromProperties.
@Test
public void testReadTimeoutPopulatedFromProperties() throws Exception {
Properties properties = properties();
properties.setProperty(EFO_HTTP_CLIENT_READ_TIMEOUT_MILLIS, "12345");
KinesisProxyV2Interface proxy = KinesisProxyV2Factory.createKinesisProxyV2(properties);
NettyConfiguration nettyConfiguration = getNettyConfiguration(proxy);
assertEquals(12345, nettyConfiguration.readTimeoutMillis());
}
use of software.amazon.awssdk.http.nio.netty.internal.NettyConfiguration in project flink by apache.
the class KinesisProxyV2FactoryTest method testClientConfigurationPopulatedTcpKeepAliveDefaults.
@Test
public void testClientConfigurationPopulatedTcpKeepAliveDefaults() throws Exception {
Properties properties = properties();
KinesisProxyV2Interface proxy = KinesisProxyV2Factory.createKinesisProxyV2(properties);
NettyConfiguration nettyConfiguration = getNettyConfiguration(proxy);
Assert.assertTrue(nettyConfiguration.tcpKeepAlive());
}
use of software.amazon.awssdk.http.nio.netty.internal.NettyConfiguration in project flink by apache.
the class AWSGeneralUtilTest method testCreateNettyAsyncHttpClientWithDefaultsTcpKeepAlive.
@Test
public void testCreateNettyAsyncHttpClientWithDefaultsTcpKeepAlive() 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.tcpKeepAlive(), nettyConfiguration.tcpKeepAlive());
}
use of software.amazon.awssdk.http.nio.netty.internal.NettyConfiguration in project flink by apache.
the class AWSGeneralUtilTest method testCreateNettyAsyncHttpClientWithDefaultsReapIdleConnections.
@Test
public void testCreateNettyAsyncHttpClientWithDefaultsReapIdleConnections() 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.reapIdleConnections(), nettyConfiguration.reapIdleConnections());
}
use of software.amazon.awssdk.http.nio.netty.internal.NettyConfiguration in project flink by apache.
the class AWSGeneralUtilTest method testCreateNettyAsyncHttpClientWithPropertyProtocol.
@Test
public void testCreateNettyAsyncHttpClientWithPropertyProtocol() throws Exception {
Protocol httpVersion = HTTP1_1;
Properties properties = new Properties();
properties.setProperty(AWSConfigConstants.HTTP_PROTOCOL_VERSION, String.valueOf(httpVersion));
SdkAsyncHttpClient httpClient = AWSGeneralUtil.createAsyncHttpClient(properties);
NettyConfiguration nettyConfiguration = TestUtil.getNettyConfiguration(httpClient);
assertEquals(httpVersion, nettyConfiguration.attribute(SdkHttpConfigurationOption.PROTOCOL));
}
Aggregations