From dc3d00e54303b32d77f700678c1a359181569f88 Mon Sep 17 00:00:00 2001 From: Nhat Nguyen Date: Tue, 12 Dec 2023 09:24:18 -0800 Subject: [PATCH] Reduce concurrent level in ManyShardsIT (#103159) (#103328) This test failed during testing with a single CPU. To prevent test failure in such cases, we should lower the concurrency level, ensuring that it doesn't spawn more than 1000 tasks. Closes #103128 Co-authored-by: Elastic Machine --- .../org/elasticsearch/xpack/esql/action/ManyShardsIT.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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(); });