This is an automated email from the ASF dual-hosted git repository.

etudenhoefner pushed a commit to branch improve-size-check
in repository https://gitbox.apache.org/repos/asf/iceberg.git

commit 032b1bde0e351c4619935c716e42c59ceba83b71
Author: Eduard Tudenhoefner <[email protected]>
AuthorDate: Fri Apr 19 09:04:27 2024 +0200

    Core: Improve size check in CatalogTests
---
 core/src/test/java/org/apache/iceberg/catalog/CatalogTests.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/core/src/test/java/org/apache/iceberg/catalog/CatalogTests.java 
b/core/src/test/java/org/apache/iceberg/catalog/CatalogTests.java
index 6904449cc4..ff01d80679 100644
--- a/core/src/test/java/org/apache/iceberg/catalog/CatalogTests.java
+++ b/core/src/test/java/org/apache/iceberg/catalog/CatalogTests.java
@@ -2746,9 +2746,9 @@ public abstract class CatalogTests<C extends Catalog & 
SupportsNamespaces> {
 
   public void assertPreviousMetadataFileCount(Table table, int 
metadataFileCount) {
     TableOperations ops = ((BaseTable) table).operations();
-    Assertions.assertThat(ops.current().previousFiles().size())
+    Assertions.assertThat(ops.current().previousFiles())
         .as("Table should have correct number of previous metadata locations")
-        .isEqualTo(metadataFileCount);
+        .hasSize(metadataFileCount);
   }
 
   public void assertNoFiles(Table table) {
@@ -2766,9 +2766,9 @@ public abstract class CatalogTests<C extends Catalog & 
SupportsNamespaces> {
               .map(FileScanTask::file)
               .map(DataFile::path)
               .collect(Collectors.toList());
-      Assertions.assertThat(paths.size())
+      Assertions.assertThat(paths)
           .as("Should contain expected number of data files")
-          .isEqualTo(files.length);
+          .hasSize(files.length);
       Assertions.assertThat(CharSequenceSet.of(paths))
           .as("Should contain correct file paths")
           
.isEqualTo(CharSequenceSet.of(Iterables.transform(Arrays.asList(files), 
DataFile::path)));

Reply via email to