From 03b354491dcd19fb3ced1a0bf6e0ac4258cc8ff7 Mon Sep 17 00:00:00 2001 From: fanng Date: Thu, 7 Nov 2024 18:57:21 +0800 Subject: [PATCH] fix it --- .../test/java/org/apache/paimon/catalog/CatalogTestBase.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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