diff --git a/paimon-core/src/test/java/org/apache/paimon/catalog/CatalogTestBase.java b/paimon-core/src/test/java/org/apache/paimon/catalog/CatalogTestBase.java index 4121d1c928ef..626c189ccf10 100644 --- a/paimon-core/src/test/java/org/apache/paimon/catalog/CatalogTestBase.java +++ b/paimon-core/src/test/java/org/apache/paimon/catalog/CatalogTestBase.java @@ -46,6 +46,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; import static org.apache.paimon.testutils.assertj.PaimonAssertions.anyCauseMatches; import static org.assertj.core.api.Assertions.assertThat; @@ -119,8 +120,8 @@ public void testDuplicatedDatabaseAfterCreatingTable() throws Exception { catalog.createTable(identifier, schema, false); List databases = catalog.listDatabases(); - Assertions.assertEquals(1, databases.size()); - Assertions.assertEquals("test_db", databases.get(0)); + List distinctDatabases = databases.stream().distinct().collect(Collectors.toList()); + Assertions.assertEquals(distinctDatabases.size(), databases.size()); } @Test