Samrat002 commented on code in PR #28867:
URL: https://github.com/apache/flink/pull/28867#discussion_r3806092933


##########
flink-filesystems/flink-s3-fs-native/src/test/java/org/apache/flink/fs/s3native/writer/SeaweedFsNativeS3Operations.java:
##########
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.fs.s3native.writer;
+
+import software.amazon.awssdk.core.sync.RequestBody;
+import software.amazon.awssdk.services.s3.S3Client;
+import software.amazon.awssdk.services.s3.model.NoSuchKeyException;
+import software.amazon.awssdk.services.s3.model.S3Object;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * {@link NativeS3ObjectOperations} backed by a real (SeaweedFS) S3 endpoint, 
plus byte-level
+ * helpers so writer/committer tests can inspect and tamper with the objects 
that actually landed in
+ * S3.
+ */
+final class SeaweedFsNativeS3Operations extends NativeS3ObjectOperations {

Review Comment:
   The benefit isn't line count, a real endpoint reproduces the actual S3 
behaviours these tests assert on. The 5 MiB multipart minimum on complete, real 
`NoSuchKeyException` semantics on `headObject`, and genuine network-level 
`GetObject`/`PutObject` responses, which is exactly what the 
missing-side-object and length-mismatch recovery tests depend on and the 
in-memory fake couldn't faithfully simulate. Added a sentence to the class 
javadoc making this explicit. 



##########
flink-filesystems/flink-s3-fs-native/src/test/java/org/apache/flink/fs/s3native/HAApplicationRunOnNativeS3FileSystemITCase.java:
##########
@@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.fs.s3native;
+
+import org.apache.flink.api.common.ApplicationState;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.FileSystem;
+import org.apache.flink.core.testutils.AllCallbackWrapper;
+import org.apache.flink.core.testutils.TestContainerExtension;
+import 
org.apache.flink.runtime.highavailability.AbstractHAApplicationRunITCase;
+import org.apache.flink.runtime.highavailability.ApplicationResultStoreOptions;
+import 
org.apache.flink.runtime.highavailability.FileSystemApplicationResultStore;
+import org.apache.flink.runtime.testutils.CommonTestUtils;
+import org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration;
+import org.apache.flink.test.junit5.MiniClusterExtension;
+
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.Order;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import software.amazon.awssdk.services.s3.model.S3Object;
+
+import java.util.List;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+/**
+ * Runs {@link AbstractHAApplicationRunITCase} with HA data stored in 
SeaweedFS via the native S3
+ * FS.
+ */
+class HAApplicationRunOnNativeS3FileSystemITCase extends 
AbstractHAApplicationRunITCase {
+
+    private static final String CLUSTER_ID = "test-cluster";
+    private static final String APPLICATION_RESULT_STORE_FOLDER = "ars";
+
+    @RegisterExtension
+    @Order(2)

Review Comment:
   Yes, deliberate: `AbstractHAApplicationRunITCase` already registers its own 
extension at `@Order(1)`, so this class's SeaweedFS container extension (and 
the MiniClusterExtension) have to run after it. Added a comment explaining 
this. 



-- 
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]

Reply via email to