diff --git a/x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/ManyShardsIT.java b/x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/ManyShardsIT.java index 7828ba97ed62b..a39439d33bfba 100644 --- a/x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/ManyShardsIT.java +++ b/x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/ManyShardsIT.java @@ -60,8 +60,10 @@ public void testConcurrentQueries() throws Exception { throw new AssertionError(e); } final var pragmas = Settings.builder(); - if (canUseQueryPragmas()) { - pragmas.put(randomPragmas().getSettings()).put("exchange_concurrent_clients", between(1, 2)); + if (randomBoolean() && canUseQueryPragmas()) { + pragmas.put(randomPragmas().getSettings()) + .put("task_concurrency", between(1, 2)) + .put("exchange_concurrent_clients", between(1, 2)); } run("from test-* | stats count(user) by tags", new QueryPragmas(pragmas.build())).close(); });