nastra commented on code in PR #9185:
URL: https://github.com/apache/iceberg/pull/9185#discussion_r1434965644


##########
flink/v1.17/flink/src/test/java/org/apache/iceberg/flink/source/TestFlinkScan.java:
##########
@@ -49,41 +53,36 @@
 import org.apache.iceberg.types.Types;
 import org.apache.iceberg.util.DateTimeUtil;
 import org.assertj.core.api.Assertions;
-import org.junit.Assert;
-import org.junit.ClassRule;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-
-@RunWith(Parameterized.class)
-public abstract class TestFlinkScan {
+import org.junit.jupiter.api.TestTemplate;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.jupiter.api.io.TempDir;
 
-  @ClassRule
-  public static final MiniClusterWithClientResource MINI_CLUSTER_RESOURCE =
-      MiniClusterResource.createWithClassloaderCheckDisabled();
+@ExtendWith(ParameterizedTestExtension.class)
+public abstract class TestFlinkScan {
+  @RegisterExtension
+  public static MiniClusterExtension miniClusterResource =
+      MiniFlinkClusterExtension.createWithClassloaderCheckDisabled();
 
-  @ClassRule public static final TemporaryFolder TEMPORARY_FOLDER = new 
TemporaryFolder();
+  @TempDir Path temporaryDirectory;
 
-  @Rule
-  public final HadoopCatalogResource catalogResource =
-      new HadoopCatalogResource(TEMPORARY_FOLDER, TestFixtures.DATABASE, 
TestFixtures.TABLE);
+  @RegisterExtension
+  public static final HadoopCatalogExtension catalogExtension =
+      new HadoopCatalogExtension(TestFixtures.DATABASE, TestFixtures.TABLE);
 
-  // parametrized variables
   protected final FileFormat fileFormat;
 
-  @Parameterized.Parameters(name = "format={0}")
-  public static Object[] parameters() {
-    return new Object[] {"avro", "parquet", "orc"};
+  @Parameters(name = "format={0}")
+  public static Collection<FileFormat> fileFormat() {
+    return Arrays.asList(FileFormat.AVRO, FileFormat.PARQUET, FileFormat.ORC);
   }
 
-  TestFlinkScan(String fileFormat) {
-    this.fileFormat = FileFormat.fromString(fileFormat);
+  TestFlinkScan(FileFormat fileFormat) {

Review Comment:
   the constructor needs to be removed because the file format will be set by 
the parameterized environment



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to