dannycranmer commented on a change in pull request #18553: URL: https://github.com/apache/flink/pull/18553#discussion_r803407497
########## File path: flink-connectors/flink-connector-aws-kinesis-firehose/src/test/java/org/apache/flink/connector/firehose/sink/KinesisFirehoseSinkITCase.java ########## @@ -123,20 +115,21 @@ public void test() throws Exception { createConfig(mockFirehoseContainer.getEndpoint())) .build(); - generator.sinkTo(kdsSink); + KinesisFirehoseTestUtils.getSampleDataGenerator(env, NUMBER_OF_ELEMENTS).sinkTo(kdsSink); env.execute("Integration Test"); - List<S3Object> objects = - listBucketObjects( - createS3Client(mockFirehoseContainer.getEndpoint(), httpClient), - BUCKET_NAME); + SdkAsyncHttpClient s3RetrievalHttpClient = + createHttpClient(mockFirehoseContainer.getEndpoint()); + S3AsyncClient s3RetrievalAsyncClient = + createS3Client(mockFirehoseContainer.getEndpoint(), s3RetrievalHttpClient); Review comment: These clients are not closed ########## File path: flink-connectors/flink-connector-aws-kinesis-firehose/src/test/java/org/apache/flink/connector/firehose/sink/KinesisFirehoseSinkITCase.java ########## @@ -78,42 +76,36 @@ @Before public void setup() throws Exception { System.setProperty(SdkSystemSetting.CBOR_ENABLED.property(), "false"); - httpClient = AWSServicesTestUtils.createHttpClient(mockFirehoseContainer.getEndpoint()); - s3AsyncClient = createS3Client(mockFirehoseContainer.getEndpoint(), httpClient); - firehoseAsyncClient = getFirehoseClient(mockFirehoseContainer.getEndpoint(), httpClient); - iamAsyncClient = createIamClient(mockFirehoseContainer.getEndpoint(), httpClient); + s3HttpClient = createHttpClient(mockFirehoseContainer.getEndpoint()); + firehoseHttpClient = createHttpClient(mockFirehoseContainer.getEndpoint()); + iamHttpClient = createHttpClient(mockFirehoseContainer.getEndpoint()); + s3AsyncClient = createS3Client(mockFirehoseContainer.getEndpoint(), s3HttpClient); + firehoseAsyncClient = + getFirehoseClient(mockFirehoseContainer.getEndpoint(), firehoseHttpClient); + iamAsyncClient = createIamClient(mockFirehoseContainer.getEndpoint(), iamHttpClient); + env = StreamExecutionEnvironment.getExecutionEnvironment(); } @After public void teardown() { System.clearProperty(SdkSystemSetting.CBOR_ENABLED.property()); - AWSGeneralUtil.closeResources( - httpClient, s3AsyncClient, firehoseAsyncClient, iamAsyncClient); + s3HttpClient.close(); + firehoseHttpClient.close(); + iamHttpClient.close(); + s3AsyncClient.close(); + firehoseAsyncClient.close(); + iamAsyncClient.close(); Review comment: Since we need to close the additional clients, please make the change -- 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