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


##########
data/src/test/java/org/apache/iceberg/io/TestAppenderFactory.java:
##########
@@ -46,45 +53,40 @@
 import org.apache.iceberg.relocated.com.google.common.collect.Sets;
 import org.apache.iceberg.util.Pair;
 import org.apache.iceberg.util.StructLikeSet;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-
-@RunWith(Parameterized.class)
-public abstract class TestAppenderFactory<T> extends TableTestBase {
-  private static final int FORMAT_V2 = 2;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.TestTemplate;
+import org.junit.jupiter.api.extension.ExtendWith;
 
-  private final FileFormat format;
-  private final boolean partitioned;
+@ExtendWith(ParameterizedTestExtension.class)
+public abstract class TestAppenderFactory<T> extends TestBase {
+  private static final int FORMAT_V2 = 2;
 
   private PartitionKey partition = null;
   private OutputFileFactory fileFactory = null;
 
-  @Parameterized.Parameters(name = "FileFormat={0}, Partitioned={1}")
-  public static Object[] parameters() {
-    return new Object[][] {
-      new Object[] {"avro", false},
-      new Object[] {"avro", true},
-      new Object[] {"orc", false},
-      new Object[] {"orc", true},
-      new Object[] {"parquet", false},
-      new Object[] {"parquet", true}
-    };
-  }
+  @Parameter protected FileFormat format;

Review Comment:
   this should have `index = 1` and `partitioned` should have `index = 2`. The 
`formatVersion` is a parameterized field in `TestBase` with ìndex = 0`, so it 
needs to be part of `parameters()` (similar to how it's done in 
https://github.com/apache/iceberg/blob/main/data/src/test/java/org/apache/iceberg/io/TestGenericSortedPosDeleteWriter.java#L65-L70)



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