use of org.apache.flink.connector.aws.config.AWSConfigConstants.AWS_REGION in project flink by apache.
the class AWSAsyncSinkUtilTest method testCreateKinesisAsyncClient.
@Test
public void testCreateKinesisAsyncClient() {
Properties properties = TestUtil.properties(AWS_REGION, "eu-west-2");
MockAsyncClientBuilder builder = mockKinesisAsyncClientBuilder();
ClientOverrideConfiguration clientOverrideConfiguration = ClientOverrideConfiguration.builder().build();
SdkAsyncHttpClient httpClient = NettyNioAsyncHttpClient.builder().build();
AWSAsyncSinkUtil.createAwsAsyncClient(properties, builder, httpClient, clientOverrideConfiguration);
verify(builder).overrideConfiguration(clientOverrideConfiguration);
verify(builder).httpClient(httpClient);
verify(builder).region(Region.of("eu-west-2"));
verify(builder).credentialsProvider(argThat(cp -> cp instanceof DefaultCredentialsProvider));
verify(builder, never()).endpointOverride(any());
}
Aggregations