aws-nageshvh commented on code in PR #196: URL: https://github.com/apache/flink-connector-aws/pull/196#discussion_r2342430228
########## flink-connector-aws/flink-connector-aws-kinesis-streams/src/main/java/org/apache/flink/connector/kinesis/sink/KinesisStreamsSinkWriter.java: ########## @@ -167,8 +204,18 @@ class KinesisStreamsSinkWriter<InputT> extends AsyncSinkWriter<InputT, PutRecord this.streamArn = streamArn; this.metrics = context.metricGroup(); this.numRecordsOutErrorsCounter = metrics.getNumRecordsOutErrorsCounter(); - this.httpClient = AWSGeneralUtil.createAsyncHttpClient(kinesisClientProperties); - this.kinesisClient = buildClient(kinesisClientProperties, this.httpClient); + + this.kinesisClientProvider = kinesisClientProvider; + + if (kinesisClientProvider != null) { + // Use the provided client for testing + this.httpClient = null; + this.kinesisClient = kinesisClientProvider.get(); + } else { + // Create a new client as before + this.httpClient = AWSGeneralUtil.createAsyncHttpClient(kinesisClientProperties); + this.kinesisClient = buildClient(kinesisClientProperties, this.httpClient); + } Review Comment: same comment as the others -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org