CrynetLogistics commented on a change in pull request #18686:
URL: https://github.com/apache/flink/pull/18686#discussion_r803673946
##########
File path:
flink-connectors/flink-connector-aws-kinesis-data-streams/src/test/java/org/apache/flink/connectors/kinesis/testutils/KinesaliteContainer.java
##########
@@ -99,25 +99,41 @@ public Properties getHostProperties() {
}
/** Returns the client to access the container from outside the docker
network. */
- public KinesisAsyncClient getContainerClient() throws URISyntaxException {
- return getClient(getContainerEndpointUrl());
+ public KinesisAsyncClient getContainerClient(SdkAsyncHttpClient httpClient)
+ throws URISyntaxException {
+ return getClient(getContainerEndpointUrl(), httpClient);
}
- /** Returns the client to access the host from inside the docker network.
*/
+ /** Returns the client with the default async http client. */
public KinesisAsyncClient getHostClient() throws URISyntaxException {
- return getClient(getHostEndpointUrl());
+ return getHostClient(buildSdkAsyncHttpClient());
}
- public KinesisAsyncClient getClient(String endPoint) throws
URISyntaxException {
+ /** Returns the client to access the host from inside the docker network.
*/
+ public KinesisAsyncClient getHostClient(SdkAsyncHttpClient httpClient)
+ throws URISyntaxException {
+ return getClient(getHostEndpointUrl(), httpClient);
+ }
+
+ public KinesisAsyncClient getClient(String endPoint, SdkAsyncHttpClient
httpClient)
+ throws URISyntaxException {
return KinesisAsyncClient.builder()
.endpointOverride(new URI(endPoint))
.region(REGION)
.credentialsProvider(
() -> AwsBasicCredentials.create(getAccessKey(),
getSecretKey()))
- .httpClient(buildSdkAsyncHttpClient())
+ .httpClient(httpClient)
.build();
}
+ public SdkAsyncHttpClient buildSdkAsyncHttpClient() {
Review comment:
The defaults in `AWSGeneralUtil` has been tuned for the service client
connecting to the actual KDS service. I would have to set quite a number of
defaults back to the original Netty Nio defaults in order to get
`KinesaliteContainer` working here.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]