From 775072b23ab7e373ea010338a90e0d2967564631 Mon Sep 17 00:00:00 2001 From: yuhui Date: Thu, 4 Jan 2024 16:07:41 +0800 Subject: [PATCH 1/2] Fix bug of failed to run the 'Drop catalog' test on the Docker image for gravitino-ci-trino:0.1.3. --- integration-test/build.gradle.kts | 2 +- .../gravitino/integration/test/trino/TrinoConnectorIT.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/integration-test/build.gradle.kts b/integration-test/build.gradle.kts index ee7b14860c9..ac5e7af52f9 100644 --- a/integration-test/build.gradle.kts +++ b/integration-test/build.gradle.kts @@ -283,7 +283,7 @@ tasks.test { // Gravitino CI Docker image 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.2") + 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 d0a1991dc77..767a293d5e1 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 @@ -1038,7 +1038,7 @@ void testDropCatalogAndCreateAgain() throws InterruptedException { createdMetalake.dropCatalog(NameIdentifier.of(metalakeName, catalogName)); // We need to test we can't load this catalog any more by Trino. success = checkTrinoHasRemoved(sql, 30); - Assertions.assertFalse(success, "Trino should not load the catalog any more: " + sql); + Assertions.assertTrue(success, "Trino should not load the catalog any more: " + sql); } } From 27e5ee46140d2a67df6cec6d6c7f59a4df75751f Mon Sep 17 00:00:00 2001 From: yuhui Date: Fri, 5 Jan 2024 14:47:01 +0800 Subject: [PATCH 2/2] Fix failed to run the testIcebergCatalogCreatedByGravitino tester. --- .../gravitino/integration/test/trino/TrinoConnectorIT.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 767a293d5e1..967d199e77d 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 @@ -858,7 +858,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);