Fly-Style commented on code in PR #18805:
URL: https://github.com/apache/druid/pull/18805#discussion_r2586113530


##########
embedded-tests/src/test/java/org/apache/druid/testing/embedded/query/QueryTestBase.java:
##########
@@ -102,10 +111,46 @@ void setUp()
     }
   }
 
+  /**
+   * Ingests Druid with some the data from {@link 
MoreResources.Task#BASIC_INDEX} in a synchronous manner.
+   *
+   * @return ingested datasource name
+   */
+  protected String ingestBasicData()
+  {
+    String datasourceName = EmbeddedClusterApis.createTestDatasourceName();
+
+    final String taskId = IdUtils.getRandomId();
+    final IndexTask task = 
MoreResources.Task.BASIC_INDEX.get().dataSource(datasourceName).withId(taskId);
+    cluster.callApi().onLeaderOverlord(o -> o.runTask(taskId, task));
+    cluster.callApi().waitForTaskToSucceed(taskId, overlord);
+    cluster.callApi().waitForAllSegmentsToBeAvailable(datasourceName, 
coordinator, broker);
+    return datasourceName;
+  }
+
+  /**
+   * Execute an async SQL query against the given endpoint via the HTTP client.
+   */
+  protected ListenableFuture<StatusResponseHolder> executeQueryAsync(String 
endpoint, String query)

Review Comment:
   Good catch!
   



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to