You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "FrankChen021 (via GitHub)" <gi...@apache.org> on 2025/06/03 10:54:57 UTC

[PR] Fix IT failure (druid)

FrankChen021 opened a new pull request, #18067:
URL: https://github.com/apache/druid/pull/18067

   Fixes the IT failure caused by #17937
   
   Using the TestHttpClient as a standard way to issue http in IT.
   
   I have ran the test cases by using the command `mvn verify -P integration-tests -pl integration-tests -P int-tests-config-file -Ddocker.build.skip=true -Ddocker.run.skip=true -Dit.test=ITSqlQueryTest` against docker containers under the integration test, so I think the problem should be resolved.
   


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Fix IT failure (druid)

Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on PR #18067:
URL: https://github.com/apache/druid/pull/18067#issuecomment-2935672566

   Thanks for the update, @FrankChen021 !
   It seems some ITs are still failing.


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Fix IT failure (druid)

Posted by "gianm (via GitHub)" <gi...@apache.org>.
gianm closed pull request #18067: Fix IT failure
URL: https://github.com/apache/druid/pull/18067


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Fix IT failure (druid)

Posted by "abhishekrb19 (via GitHub)" <gi...@apache.org>.
abhishekrb19 commented on PR #18067:
URL: https://github.com/apache/druid/pull/18067#issuecomment-2937479338

   Looks like the static checks (dependency analyzer check) is failing. `pom.xml` needs an update with the following dependency after this [commit](https://github.com/apache/druid/pull/18067/commits/eaf2e0866e408c6284270280a699d38b71b90499):
   ```
   Warning:  Used undeclared dependencies found:
   Warning:     com.fasterxml.jackson.dataformat:jackson-dataformat-smile:jar:2.12.7:compile
   [INFO] Add the following to your pom to correct the missing dependencies: 
   [INFO] 
   <dependency>
     <groupId>com.fasterxml.jackson.dataformat</groupId>
     <artifactId>jackson-dataformat-smile</artifactId>
     <version>2.12.7</version>
   </dependency>
   ```


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Fix IT failure (druid)

Posted by "FrankChen021 (via GitHub)" <gi...@apache.org>.
FrankChen021 commented on PR #18067:
URL: https://github.com/apache/druid/pull/18067#issuecomment-2938409481

   All checks passes, we can merge it @kfaraz @gianm 


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Fix IT failure (druid)

Posted by "FrankChen021 (via GitHub)" <gi...@apache.org>.
FrankChen021 commented on code in PR #18067:
URL: https://github.com/apache/druid/pull/18067#discussion_r2123876831


##########
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:
   You're right, we can use testNG's Assert. 
   Previously my IDE suggested me to use JUnit's Assert which is not part of the IT module, so I had to add this method



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Fix IT failure (druid)

Posted by "FrankChen021 (via GitHub)" <gi...@apache.org>.
FrankChen021 commented on code in PR #18067:
URL: https://github.com/apache/druid/pull/18067#discussion_r2123731314


##########
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:
   let's keep it as it's now to leave some space for flexible customization of the request object



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Fix IT failure (druid)

Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on code in PR #18067:
URL: https://github.com/apache/druid/pull/18067#discussion_r2123772993


##########
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:
   Wouldn't testNG [Assert](https://www.javadoc.io/doc/org.testng/testng/6.8.17/org/testng/Assert.html#assertEquals(int,%20int,%20java.lang.String)) achieve the same result?
   I should think that it prints the expected and actual values, similar to JUnit Assert.
   I haven't checked it though.



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Fix IT failure (druid)

Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on code in PR #18067:
URL: https://github.com/apache/druid/pull/18067#discussion_r2123547440


##########
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 test cases, the `request` object seems to remain unchanged.
   In this test case, 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.



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Fix IT failure (druid)

Posted by "FrankChen021 (via GitHub)" <gi...@apache.org>.
FrankChen021 commented on PR #18067:
URL: https://github.com/apache/druid/pull/18067#issuecomment-2936232567

   some ITs cases in other modules failed it's because native queries support SMILE encoding, but the content type is overriden in router to JSON.


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Fix IT failure (druid)

Posted by "gianm (via GitHub)" <gi...@apache.org>.
gianm commented on PR #18067:
URL: https://github.com/apache/druid/pull/18067#issuecomment-2937319431

   Added `jacoco:skip` and reopened the PR to skip the coverage check and run ITs.


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Fix IT failure (druid)

Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
kfaraz commented on code in PR #18067:
URL: https://github.com/apache/druid/pull/18067#discussion_r2123772993


##########
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:
   Wouldn't testNG [Assert](https://www.javadoc.io/doc/org.testng/testng/6.8.17/org/testng/Assert.html#assertEquals(int,%20int,%20java.lang.String)) achieve the same result?



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Fix IT failure (druid)

Posted by "FrankChen021 (via GitHub)" <gi...@apache.org>.
FrankChen021 commented on code in PR #18067:
URL: https://github.com/apache/druid/pull/18067#discussion_r2123828354


##########
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:
   resolved



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Fix IT failure (druid)

Posted by "kfaraz (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Fix IT failure (druid)

Posted by "clintropolis (via GitHub)" <gi...@apache.org>.
clintropolis merged PR #18067:
URL: https://github.com/apache/druid/pull/18067


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Fix IT failure (druid)

Posted by "FrankChen021 (via GitHub)" <gi...@apache.org>.
FrankChen021 commented on code in PR #18067:
URL: https://github.com/apache/druid/pull/18067#discussion_r2123702617


##########
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:
   It's needed for troubleshooting from the log to understand what's returned from server in case of test failure



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Fix IT failure (druid)

Posted by "FrankChen021 (via GitHub)" <gi...@apache.org>.
FrankChen021 commented on PR #18067:
URL: https://github.com/apache/druid/pull/18067#issuecomment-2935362697

   @kfaraz the IT didn't run because the coverage test failed (a typo in sql module was fixed). But the IT problem has been fixed, and I think we can merge it after other CI checks pass


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org