xiangfu0 commented on code in PR #20430:
URL: https://github.com/apache/pinot/pull/20430#discussion_r4759781771


##########
pinot-broker/src/test/java/org/apache/pinot/broker/querylog/QueryLoggerTest.java:
##########
@@ -243,6 +243,21 @@ public void shouldLogQueryReceivedWhenAllowed() {
     Assert.assertTrue(_infoLog.get(0).contains("SQL query for request 123"));
   }
 
+  @Test
+  public void shouldTruncateQueryReceivedToMaxQueryLength() {
+    // Given: a query longer than the configured max length, e.g. one carrying 
a large vector literal
+    Mockito.when(_logRateLimiter.tryAcquire()).thenReturn(true);

Review Comment:
   `when` and `assertEquals` are already statically imported. Can we use them 
directly in the new test?



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