nastra commented on code in PR #9862:
URL: https://github.com/apache/iceberg/pull/9862#discussion_r1517341568
##########
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;
+
+ @Parameter(index = 1)
+ private boolean partitioned;
- public TestAppenderFactory(String fileFormat, boolean partitioned) {
- super(FORMAT_V2);
- this.format = FileFormat.fromString(fileFormat);
- this.partitioned = partitioned;
+ @Parameters(name = "FileFormat={0}, partitioned={1}")
Review Comment:
```suggestion
@Parameters(name = "FormatVersion={0}, FileFormat={1}, partitioned={2}")
```
##########
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;
+
+ @Parameter(index = 1)
+ private boolean partitioned;
- public TestAppenderFactory(String fileFormat, boolean partitioned) {
- super(FORMAT_V2);
- this.format = FileFormat.fromString(fileFormat);
- this.partitioned = partitioned;
+ @Parameters(name = "FileFormat={0}, partitioned={1}")
+ public static List<Object> parameters() {
Review Comment:
```suggestion
protected static List<Object> parameters() {
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]