danhuawang commented on code in PR #5632:
URL: https://github.com/apache/gravitino/pull/5632#discussion_r1851403170


##########
trino-connector/integration-test/src/test/java/org/apache/gravitino/trino/connector/integration/test/TrinoQueryIT.java:
##########
@@ -131,6 +132,23 @@ public void runOneTestSetWithCatalog(
     TrinoQueryRunner queryRunner = new 
TrinoQueryRunner(TrinoQueryITBase.trinoUri);
     executeSqlFile(testSetDirName, catalogPrefix + "prepare.sql", queryRunner, 
catalog);
 
+    if (new File(ITUtils.joinPath(testSetDirName, catalogPrefix + 
"cascading_test.sql")).exists()) {
+      Awaitility.await()
+          .atMost(30, TimeUnit.SECONDS)
+          .pollInterval(1, TimeUnit.SECONDS)
+          .until(
+              () -> {
+                try {
+                  executeSqlFile(
+                      testSetDirName, catalogPrefix + "cascading_test.sql", 
queryRunner, catalog);
+                  return true;
+                } catch (Exception e) {
+                  LOG.error("Failed to run query using trino cascading 
connector", e);
+                  return false;
+                }
+              });
+    }
+

Review Comment:
   After prepare.sql, sometimes query data by cascading connector encounter the 
issue like: tb01 not existed in internal connector, but the tb01 exist when I 
manually check. I think there's delay time switching  connector , so 
"cascading_test.sql" is used to check if the table that created in prepare.sql 
can be ready to query data by cascading connector.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to