Samrat002 commented on code in PR #30047:
URL: https://github.com/apache/flink/pull/30047#discussion_r4659138754
##########
flink-filesystems/flink-s3-fs-native/src/test/java/org/apache/flink/fs/s3native/HAJobRunOnNativeS3FileSystemITCase.java:
##########
@@ -18,22 +18,80 @@
package org.apache.flink.fs.s3native;
-import org.junit.jupiter.api.Order;
+import org.apache.flink.core.testutils.AllCallbackWrapper;
+import org.apache.flink.core.testutils.TestContainerExtension;
+import org.apache.flink.runtime.minicluster.MiniCluster;
+import org.apache.flink.runtime.testutils.MiniClusterResource;
+import org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration;
+import org.apache.flink.testutils.junit.extensions.parameterized.Parameter;
+import
org.apache.flink.testutils.junit.extensions.parameterized.ParameterizedTestExtension;
+import org.apache.flink.testutils.junit.extensions.parameterized.Parameters;
+
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.TestTemplate;
+import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.extension.RegisterExtension;
-/** HA Job Test Implementation. * */
+import java.util.Arrays;
+import java.util.Collection;
+
+/** Runs the HA job test with the default HTTP client and with the CRT client.
*/
+@ExtendWith(ParameterizedTestExtension.class)
class HAJobRunOnNativeS3FileSystemITCase extends
AbstractNativeS3HAJobRunITCase {
- // AbstractHAJobRunITCase already registers its own extension at
@Order(1), so this one must
- // run after it.
@RegisterExtension
- @Order(2)
- private static final SeaweedFsNativeS3HAClusterExtension CLUSTER_EXTENSION
=
- new SeaweedFsNativeS3HAClusterExtension(
- AbstractNativeS3HAJobRunITCase::createConfiguration);
+ private static final
AllCallbackWrapper<TestContainerExtension<SeaweedFsNativeS3TestContainer>>
Review Comment:
The base test is disabled by a JUnit quirk. The subclass overrides
`testJobExecutionInHaMode(MiniCluster)` with an empty body and no `@Test`. This
works only because JUnit 5 does not carry annotations over to an overriding
method, and nothing in the code makes that obvious.
- If someone later adds @Test, or JUnit's behaviour changes, an empty
test passes silently.
- It also leaves a parameter-injected method in the subclass that does
nothing.
can you make the base @Test method call a protected hook that subclasses can
opt out of, or move the @Test into a subclass.
--
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]