davidradl commented on code in PR #27970:
URL: https://github.com/apache/flink/pull/27970#discussion_r3109241098
##########
flink-filesystems/flink-s3-fs-native/src/test/java/org/apache/flink/fs/s3native/NativeS3BulkCopyHelperTest.java:
##########
@@ -105,4 +110,42 @@ void testExtractKeyVeryLongPath() {
path.append("file.txt");
assertThat(helper.extractKey("s3://bucket/" +
path)).isEqualTo(path.toString());
}
+
+ @Test
+ void testConnectionPoolExhaustedDetection() {
+ assertThat(
+ NativeS3BulkCopyHelper.isConnectionPoolExhausted(
+ SdkClientException.builder()
+ .message(
+ "Unable to execute HTTP
request: "
+ + "Acquire operation
took longer than the configured maximum time.")
+ .build()))
+ .isTrue();
+ assertThat(
+ NativeS3BulkCopyHelper.isConnectionPoolExhausted(
+ SdkClientException.builder()
+ .message("Unable to execute HTTP
request")
+ .cause(
+ new RuntimeException(
+ "channel acquisition
failed",
+ new
java.util.concurrent.TimeoutException(
Review Comment:
If the connection pool is exhausted - I assume we wait to give it time to
recover? I suggest having a test that starts with it exhausted then it becomes
available and carries on working.
--
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]