Samrat002 commented on code in PR #27788:
URL: https://github.com/apache/flink/pull/27788#discussion_r3214471168
##########
flink-filesystems/flink-s3-fs-native/src/test/java/org/apache/flink/fs/s3native/NativeS3FileSystemFactoryTest.java:
##########
@@ -594,4 +594,166 @@ void testInvalidTimeoutConfigurationThrowsException() {
assertThatThrownBy(() -> factory.create(fsUri))
.isInstanceOf(IllegalArgumentException.class);
}
+
+ // ---- Bucket-level configuration tests ----
+
+ @Test
+ void testCreateFileSystemWithBucketSpecificEndpoint() throws Exception {
Review Comment:
Good point. The "not null" tests were generic and said nothing about *what*
was configured. I have reworked the factory tests so each test asserts a
specific, observable outcome:
- Timeout/connection tests assert exact values via `fs.getClientProvider()`
getters (e.g., `getConnectionTimeout()`, `getMaxConnections()`).
- Bucket-override tests assert that `fs.getClientProvider().getRegion()` /
`.getEndpoint()` reflect the expected overridden value — confirming the
override-resolution path is exercised end-to-end (two new `@VisibleForTesting`
getters were added to `S3ClientProvider` for this).
- Error-path tests assert the exact exception type and message substring,
pinpointing what validation fired.
The remaining `assertThat(fs).isNotNull()` calls are limited to the few
cases that purely verify *no exception is thrown* for a valid but otherwise
opaque configuration (e.g., `testEntropyInjectionWithValidConfiguration`),
which is a valid assertion in its own right.
--
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]