kfaraz commented on code in PR #18067:
URL: https://github.com/apache/druid/pull/18067#discussion_r2123535875
##########
integration-tests/src/test/java/org/apache/druid/tests/query/ITSqlQueryTest.java:
##########
@@ -55,19 +55,23 @@ public class ITSqlQueryTest
@Inject
IntegrationTestingConfig config;
+ @Inject
+ @TestClient
+ HttpClient httpClient;
+
interface IExecutable
{
- void execute(String endpoint) throws IOException;
+ void execute(String endpoint) throws Exception;
}
interface OnRequest
{
- void on(HttpPost request) throws IOException;
+ void on(Request request) throws IOException;
}
interface OnResponse
{
- void on(int statusCode, HttpEntity response) throws IOException;
+ void on(int statusCode, String response) throws IOException;
}
private void executeWithRetry(String endpoint, String contentType,
IExecutable executable)
Review Comment:
Maybe use `ITRetryUtils` in this method.
##########
integration-tests/src/test/java/org/apache/druid/tests/query/ITSqlQueryTest.java:
##########
@@ -350,15 +326,13 @@ public void testMultipleContentType()
{
executeQuery(
MediaType.TEXT_PLAIN,
+ "SELECT 1",
(request) -> {
Review Comment:
With this patch, in all the other cases, the `request` object seems to
remain unchanged.
In this method, we just add an extra header.
So maybe instead of passing lambda `OnRequest` to the method `executeQuery`,
we just pass a map of headers for simplicity.
##########
integration-tests/src/test/java/org/apache/druid/tests/query/ITSqlQueryTest.java:
##########
@@ -133,10 +143,10 @@ private void assertEquals(String expected, String actual)
}
}
- private void assertEquals(int expected, int actual)
+ private void assertEquals(int expected, int actual, String message)
Review Comment:
Is this method really needed, can't we just use `Assert.assertEquals()`?
--
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]