nastra commented on code in PR #9849: URL: https://github.com/apache/iceberg/pull/9849#discussion_r1514880737
########## core/src/test/java/org/apache/iceberg/TestFindFiles.java: ########## @@ -184,33 +181,33 @@ public void testCaseSensitivity() { .withMetadataMatching(Expressions.startsWith("FILE_PATH", "/path/to/data-a")) .collect(); - Assert.assertEquals(pathSet(FILE_A), pathSet(files)); + assertThat(pathSet(files)).isEqualTo(pathSet(FILE_A)); } - @Test + @TestTemplate public void testIncludeColumnStats() { table.newAppend().appendFile(FILE_WITH_STATS).commit(); Iterable<DataFile> files = FindFiles.in(table).includeColumnStats().collect(); final DataFile file = files.iterator().next(); - Assert.assertEquals(FILE_WITH_STATS.columnSizes(), file.columnSizes()); - Assert.assertEquals(FILE_WITH_STATS.valueCounts(), file.valueCounts()); - Assert.assertEquals(FILE_WITH_STATS.nullValueCounts(), file.nullValueCounts()); - Assert.assertEquals(FILE_WITH_STATS.nanValueCounts(), file.nanValueCounts()); - Assert.assertEquals(FILE_WITH_STATS.lowerBounds(), file.lowerBounds()); - Assert.assertEquals(FILE_WITH_STATS.upperBounds(), file.upperBounds()); + assertThat(file.columnSizes()).isEqualTo(FILE_WITH_STATS.columnSizes()); + assertThat(file.valueCounts()).isEqualTo(FILE_WITH_STATS.valueCounts()); + assertThat(file.nullValueCounts()).isEqualTo(FILE_WITH_STATS.nullValueCounts()); + assertThat(file.nanValueCounts()).isEqualTo(FILE_WITH_STATS.nanValueCounts()); + assertThat(file.lowerBounds()).isEqualTo(FILE_WITH_STATS.lowerBounds()); + assertThat(file.upperBounds()).isEqualTo(FILE_WITH_STATS.upperBounds()); } - @Test + @TestTemplate public void testNoSnapshot() { // a table has no snapshot when it just gets created and no data is loaded yet // if not handled properly, NPE will be thrown in collect() Iterable<DataFile> files = FindFiles.in(table).collect(); // verify an empty collection of data file is returned - Assert.assertEquals(0, Sets.newHashSet(files).size()); + assertThat(Sets.newHashSet(files)).hasSize(0); Review Comment: ```suggestion assertThat(files).hasSize(0); ``` -- 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