github-advanced-security[bot] commented on code in PR #19747:
URL: https://github.com/apache/druid/pull/19747#discussion_r3649153551


##########
server/src/test/java/org/apache/druid/client/CachingClusteredClientTest.java:
##########
@@ -3053,6 +3053,82 @@
     Assert.assertEquals("RsQmZHYstvXNeGf86z3pgpk+Wsg=", 
responseContext.getEntityTag());
   }
 
+  /**
+   * The lane and priority the scheduler assigns must be reported back through 
the response context, since the query
+   * lifecycle captured the query before the scheduler ran and cannot see the 
assignment otherwise.
+   */
+  @Test
+  public void testAssignedLaneAndPriorityReportedInResponseContext()
+  {
+    prepareTimeBoundaryTimeline();
+
+    final TimeBoundaryQuery query = Druids
+        .newTimeBoundaryQueryBuilder()
+        .dataSource(DATA_SOURCE)
+        .intervals(new 
MultipleIntervalSegmentSpec(ImmutableList.of(Intervals.of("2016-01-01/2016-01-02"))))
+        .context(ImmutableMap.of(QueryContexts.LANE_KEY, "low", 
QueryContexts.PRIORITY_KEY, -5))
+        .randomQueryId()
+        .build();
+
+    final ResponseContext responseContext = initializeResponseContext();
+    getDefaultQueryRunner().run(QueryPlus.wrap(query), responseContext);
+

Review Comment:
   ## CodeQL / Deprecated method or constructor invocation
   
   Invoking [DataSegment.DataSegment](1) should be avoided because it has been 
deprecated.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/9669)



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