diff --git a/paimon-core/src/test/java/org/apache/paimon/jdbc/JdbcCatalogTest.java b/paimon-core/src/test/java/org/apache/paimon/jdbc/JdbcCatalogTest.java index 9e01885f9c8c..51e2bf5c779d 100644 --- a/paimon-core/src/test/java/org/apache/paimon/jdbc/JdbcCatalogTest.java +++ b/paimon-core/src/test/java/org/apache/paimon/jdbc/JdbcCatalogTest.java @@ -18,6 +18,7 @@ package org.apache.paimon.jdbc; +import org.apache.paimon.catalog.Catalog; import org.apache.paimon.catalog.CatalogTestBase; import org.apache.paimon.catalog.Identifier; import org.apache.paimon.options.CatalogOptions; @@ -95,7 +96,7 @@ public void testUpperCase() throws Exception { Identifier.create("TEST_DB", "new_table"), DEFAULT_TABLE_SCHEMA, false)) - .isInstanceOf(Exception.class) + .isInstanceOf(Catalog.DatabaseNotExistException.class) .hasMessage("Database TEST_DB does not exist."); catalog.createTable(Identifier.create("test_db", "new_TABLE"), DEFAULT_TABLE_SCHEMA, false); diff --git a/paimon-hive/paimon-hive-connector-common/src/test/java/org/apache/paimon/hive/HiveCatalogITCaseBase.java b/paimon-hive/paimon-hive-connector-common/src/test/java/org/apache/paimon/hive/HiveCatalogITCaseBase.java index 9e23ffc5b913..0aed4eb9a225 100644 --- a/paimon-hive/paimon-hive-connector-common/src/test/java/org/apache/paimon/hive/HiveCatalogITCaseBase.java +++ b/paimon-hive/paimon-hive-connector-common/src/test/java/org/apache/paimon/hive/HiveCatalogITCaseBase.java @@ -1006,7 +1006,8 @@ public void testRenameTable() throws Exception { // the target table name has upper case. assertThatThrownBy(() -> tEnv.executeSql("ALTER TABLE t1 RENAME TO T1")) - .hasMessage("Table name [T1] cannot contain upper case in the catalog."); + .hasMessage( + "Could not execute ALTER TABLE my_hive.test_db.t1 RENAME TO my_hive.test_db.T1."); tEnv.executeSql("ALTER TABLE t1 RENAME TO t3").await(); @@ -1168,7 +1169,8 @@ public void testUpperCase() { tEnv.executeSql( "CREATE TABLE tt ( A INT, b STRING, C STRING) WITH ( 'file.format' = 'avro' )") .await()) - .hasRootCauseMessage("Table test_db.tt already exists."); + .hasRootCauseMessage( + "Table (or view) test_db.tt already exists in Catalog my_hive."); } @Test diff --git a/paimon-spark/paimon-spark-ut/src/test/java/org/apache/paimon/spark/SparkGenericCatalogWithHiveTest.java b/paimon-spark/paimon-spark-ut/src/test/java/org/apache/paimon/spark/SparkGenericCatalogWithHiveTest.java index de003a3f1cb3..f3d4ba878905 100644 --- a/paimon-spark/paimon-spark-ut/src/test/java/org/apache/paimon/spark/SparkGenericCatalogWithHiveTest.java +++ b/paimon-spark/paimon-spark-ut/src/test/java/org/apache/paimon/spark/SparkGenericCatalogWithHiveTest.java @@ -69,7 +69,7 @@ public void testBuildWithHive(@TempDir java.nio.file.Path tempDir) { + " ('file.format'='avro')"); assertThat(spark.sql("SHOW NAMESPACES").collectAsList().stream().map(Object::toString)) - .containsExactlyInAnyOrder("[default]", "[my_db]", "[my_db1]"); + .containsExactlyInAnyOrder("[default]", "[my_db]"); assertThat( spark.sql("SHOW TABLES").collectAsList().stream()