github-advanced-security[bot] commented on code in PR #18148:
URL: https://github.com/apache/druid/pull/18148#discussion_r2403657088
##########
processing/src/test/java/org/apache/druid/query/groupby/GroupByQueryRunnerFailureTest.java:
##########
@@ -318,4 +330,258 @@
() -> GroupByQueryRunnerTestHelper.runQuery(factory, mergeRunners,
query)
);
}
+
+ @Test(timeout = 60_000L)
+ public void testTimeoutExceptionOnQueryable_multiThreaded()
+ {
+ final GroupByQuery query = GroupByQuery
+ .builder()
+ .setDataSource(QueryRunnerTestHelper.DATA_SOURCE)
+ .setQuerySegmentSpec(QueryRunnerTestHelper.FIRST_TO_THIRD)
+ .setDimensions(new DefaultDimensionSpec("quality", "alias"))
+ .setAggregatorSpecs(new LongSumAggregatorFactory("rows", "rows"))
+ .setGranularity(Granularities.ALL)
+ .overrideContext(Map.of(QueryContexts.TIMEOUT_KEY, 1))
+ .build();
+
+ GroupByQueryRunnerFactory factory = makeQueryRunnerFactory(
+ GroupByQueryRunnerTest.DEFAULT_MAPPER,
+ new GroupByQueryConfig()
+ {
+
+ @Override
+ public boolean isSingleThreaded()
+ {
+ return true;
+ }
+ }
+ );
+ QueryRunner<ResultRow> mockRunner = (queryPlus, responseContext) -> {
+ try {
+ Thread.sleep(100);
+ }
+ catch (InterruptedException e) {
+ throw new RuntimeException(e);
+ }
+ return Sequences.empty();
+ };
+
+ QueryRunner<ResultRow> mergeRunners = factory.mergeRunners(
+ Execs.directExecutor(),
+ List.of(runner, mockRunner)
+ );
Review Comment:
## Deprecated method or constructor invocation
Invoking [QueryRunnerFactory.mergeRunners](1) should be avoided because it
has been deprecated.
[Show more
details](https://github.com/apache/druid/security/code-scanning/10492)
--
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]