From c38440f59006abad96bdcebb35c5503fc7414646 Mon Sep 17 00:00:00 2001 From: Jerry Shao Date: Fri, 5 Jan 2024 17:15:26 +0800 Subject: [PATCH] [#1328] fix(trino-connector): Fix the failed 'drop catalog' test on Trino image gravitino-ci-trino:0.1.3. (#1347) ### What changes were proposed in this pull request? Fix the failed 'drop catalog' test on Trino image gravitino-ci-trino:0.1.3. Trino image gravitino-ci-trino:0.1.2 use the gravitino-trino-connector-0.3.0-SNAPSHOT.jar, it does not support drop catalog, so the tester has made it compatible with this. Trino image gravitino-ci-trino:0.1.3 use the gravitino-trino-connector-0.4.0-SNAPSHOT.jar, it support drop catalog. the test did not pass. ### Why are the changes needed? Fix: #1328 ### Does this PR introduce _any_ user-facing change? NO ### How was this patch tested? NO --------- Co-authored-by: Yuhui --- integration-test/build.gradle.kts | 4 ++-- .../gravitino/integration/test/trino/TrinoConnectorIT.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/integration-test/build.gradle.kts b/integration-test/build.gradle.kts index 94e99b49056..2cbadab895e 100644 --- a/integration-test/build.gradle.kts +++ b/integration-test/build.gradle.kts @@ -281,8 +281,8 @@ tasks.test { } // Gravitino CI Docker image - environment("GRAVITINO_CI_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-hive:0.1.6") - environment("GRAVITINO_CI_TRINO_DOCKER_IMAGE", "datastrato/gravitino-ci-trino:0.1.2") + environment("GRAVITINO_CI_HIVE_DOCKER_IMAGE", "datastrato/gravitino-ci-hive:0.1.7") + environment("GRAVITINO_CI_TRINO_DOCKER_IMAGE", "datastrato/gravitino-ci-trino:0.1.3") val testMode = project.properties["testMode"] as? String ?: "embedded" systemProperty("gravitino.log.path", buildDir.path + "/integration-test.log") diff --git a/integration-test/src/test/java/com/datastrato/gravitino/integration/test/trino/TrinoConnectorIT.java b/integration-test/src/test/java/com/datastrato/gravitino/integration/test/trino/TrinoConnectorIT.java index 8fc0a6f6052..7a48602a30a 100644 --- a/integration-test/src/test/java/com/datastrato/gravitino/integration/test/trino/TrinoConnectorIT.java +++ b/integration-test/src/test/java/com/datastrato/gravitino/integration/test/trino/TrinoConnectorIT.java @@ -850,7 +850,8 @@ void testIcebergCatalogCreatedByGravitino() throws InterruptedException { final String sql1 = String.format("drop schema \"%s.%s\".%s cascade", metalakeName, catalogName, schemaName); // Will fail because the iceberg catalog does not support cascade drop - containerSuite.getTrinoContainer().executeUpdateSQL(sql1); + Assertions.assertThrows( + RuntimeException.class, () -> containerSuite.getTrinoContainer().executeUpdateSQL(sql1)); final String sql2 = String.format("show schemas in \"%s.%s\" like '%s'", metalakeName, catalogName, schemaName);