use of org.apache.beam.sdk.io.aws2.common.HttpClientConfiguration in project beam by apache.
the class AwsOptionsTest method testSetHttpClientConfiguration.
@Test
public void testSetHttpClientConfiguration() {
AwsOptions options = create("--httpClientConfiguration={" + "\"connectionAcquisitionTimeout\":100," + "\"connectionMaxIdleTime\":200," + "\"connectionTimeout\":300," + "\"connectionTimeToLive\":400," + "\"socketTimeout\":500," + "\"readTimeout\":600," + "\"writeTimeout\":700," + "\"maxConnections\":10}");
HttpClientConfiguration expected = HttpClientConfiguration.builder().connectionAcquisitionTimeout(100).connectionMaxIdleTime(200).connectionTimeout(300).connectionTimeToLive(400).socketTimeout(500).readTimeout(600).writeTimeout(700).maxConnections(10).build();
assertThat(options.getHttpClientConfiguration()).isEqualTo(expected);
assertThat(serializeDeserialize(options).getHttpClientConfiguration()).isEqualTo(expected);
}
use of org.apache.beam.sdk.io.aws2.common.HttpClientConfiguration in project beam by apache.
the class AwsModuleTest method testHttpClientConfigurationSerializationDeserialization.
@Test
public void testHttpClientConfigurationSerializationDeserialization() throws Exception {
HttpClientConfiguration expected = HttpClientConfiguration.builder().connectionAcquisitionTimeout(100).connectionMaxIdleTime(200).connectionTimeout(300).connectionTimeToLive(400).socketTimeout(500).readTimeout(600).writeTimeout(700).maxConnections(10).build();
assertThat(serializeAndDeserialize(expected)).isEqualTo(expected);
}
Aggregations