attilakreiner commented on code in PR #10657:
URL: https://github.com/apache/iceberg/pull/10657#discussion_r1668930945


##########
data/src/test/java/org/apache/iceberg/TestMergingMetrics.java:
##########
@@ -192,16 +187,16 @@ public void verifyRandomlyGeneratedRecordsMetric() throws 
Exception {
         .map(Types.NestedField::fieldId)
         .forEach(
             id ->
-                Assert.assertNull(
-                    "NaN count for field %s should be null", 
metrics.nanValueCounts().get(id)));
+                assertThat(metrics.nanValueCounts().get(id))
+                    .as("NaN count for field %s should be null")
+                    .isNull());
   }
 
   private void assertNaNCountMatch(
       Long expected, Map<Integer, Long> nanValueCount, Types.NestedField 
field) {
-    Assert.assertEquals(
-        String.format("NaN count for field %s does not match expected", 
field.name()),
-        expected,
-        nanValueCount.get(FIELDS_WITH_NAN_COUNT_TO_ID.get(field)));
+    assertThat(nanValueCount.get(FIELDS_WITH_NAN_COUNT_TO_ID.get(field)))

Review Comment:
   cool, thx, done



##########
data/src/test/java/org/apache/iceberg/TestSplitScan.java:
##########
@@ -32,59 +35,50 @@
 import org.apache.iceberg.io.FileAppender;
 import org.apache.iceberg.relocated.com.google.common.collect.Lists;
 import org.apache.iceberg.types.Types;
-import org.junit.Assert;
-import org.junit.Before;
-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)
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.TestTemplate;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.junit.jupiter.api.io.TempDir;
+
+@ExtendWith(ParameterizedTestExtension.class)
 public class TestSplitScan {
   private static final Configuration CONF = new Configuration();
   private static final HadoopTables TABLES = new HadoopTables(CONF);
-
   private static final long SPLIT_SIZE = 16 * 1024 * 1024;
 
   private static final Schema SCHEMA =
       new Schema(
           required(1, "id", Types.IntegerType.get()), required(2, "data", 
Types.StringType.get()));
 
+  @Parameters(name = "fileFormat = {0}")
+  public static Collection<FileFormat> parameters() {
+    return Arrays.asList(FileFormat.PARQUET, FileFormat.AVRO);
+  }
+
   private Table table;
   private File tableLocation;
-
-  @Rule public TemporaryFolder temp = new TemporaryFolder();
   private List<Record> expectedRecords;
 
-  @Parameterized.Parameters(name = "format = {0}")
-  public static Object[] parameters() {
-    return new Object[] {"parquet", "avro"};
-  }
+  @Parameter private FileFormat format;
+  @TempDir private File tempDir;
 
-  private final FileFormat format;
-
-  public TestSplitScan(String format) {
-    this.format = FileFormat.fromString(format);
-  }
-
-  @Before
+  @BeforeEach
   public void before() throws IOException {
-    tableLocation = new File(temp.newFolder(), "table");

Review Comment:
   done



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

Reply via email to