From 09ebdca254a1bdcef3a94433c7f1fb16346ae845 Mon Sep 17 00:00:00 2001 From: rohit-satya <151615370+rohit-satya@users.noreply.github.com> Date: Sun, 5 May 2024 13:17:52 +0530 Subject: [PATCH] [3251] Improvement: fix assertion (#3263) ### What changes were proposed in this pull request? Fixed assertion Fix: #3251 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Ran test locally multiple times --------- Signed-off-by: Rohit Satya --- .../gravitino/trino/connector/TestGravitinoConnector.java | 2 +- .../TestGravitinoConnectorWithMetalakeCatalogName.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/trino-connector/src/test/java/com/datastrato/gravitino/trino/connector/TestGravitinoConnector.java b/trino-connector/src/test/java/com/datastrato/gravitino/trino/connector/TestGravitinoConnector.java index 00fa2004b32..d7cfff53e9e 100644 --- a/trino-connector/src/test/java/com/datastrato/gravitino/trino/connector/TestGravitinoConnector.java +++ b/trino-connector/src/test/java/com/datastrato/gravitino/trino/connector/TestGravitinoConnector.java @@ -214,7 +214,7 @@ public void testCreateCatalog() throws Exception { assertThat(computeActual("show catalogs").getOnlyColumnAsSet()).contains("memory"); // testing the gravitino connector framework works. - assertThat(computeActual("select * from system.jdbc.tables")); + assertThat(computeActual("select * from system.jdbc.tables").getRowCount()).isGreaterThan(1); // test metalake named test. the connector name is gravitino assertUpdate("call gravitino.system.create_catalog('memory1', 'memory', Map())"); diff --git a/trino-connector/src/test/java/com/datastrato/gravitino/trino/connector/TestGravitinoConnectorWithMetalakeCatalogName.java b/trino-connector/src/test/java/com/datastrato/gravitino/trino/connector/TestGravitinoConnectorWithMetalakeCatalogName.java index a7691c65cd6..0ca3749f006 100644 --- a/trino-connector/src/test/java/com/datastrato/gravitino/trino/connector/TestGravitinoConnectorWithMetalakeCatalogName.java +++ b/trino-connector/src/test/java/com/datastrato/gravitino/trino/connector/TestGravitinoConnectorWithMetalakeCatalogName.java @@ -95,7 +95,7 @@ public void testCreateCatalog() throws Exception { assertThat(computeActual("show catalogs").getOnlyColumnAsSet()).contains("test.memory"); // testing the gravitino connector framework works. - assertThat(computeActual("select * from system.jdbc.tables")); + assertThat(computeActual("select * from system.jdbc.tables").getRowCount()).isGreaterThan(1); // test metalake named test. the connector name is gravitino assertUpdate("call gravitino.system.create_catalog('memory1', 'memory', Map())");