From 8aa1b9db3f2d4540a946f8fb1dceb19a96b2bdea Mon Sep 17 00:00:00 2001 From: David Turner Date: Mon, 6 Feb 2023 10:22:56 +0000 Subject: [PATCH] AbstractThrottledTaskRunnerTests needs all-core threads The same fix as in #93446, which was missed in #93436 --- .../util/concurrent/AbstractThrottledTaskRunnerTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/test/java/org/elasticsearch/common/util/concurrent/AbstractThrottledTaskRunnerTests.java b/server/src/test/java/org/elasticsearch/common/util/concurrent/AbstractThrottledTaskRunnerTests.java index a47000a395ac8..53df99d2641e7 100644 --- a/server/src/test/java/org/elasticsearch/common/util/concurrent/AbstractThrottledTaskRunnerTests.java +++ b/server/src/test/java/org/elasticsearch/common/util/concurrent/AbstractThrottledTaskRunnerTests.java @@ -36,7 +36,7 @@ public class AbstractThrottledTaskRunnerTests extends ESTestCase { public void setUp() throws Exception { super.setUp(); maxThreads = between(1, 10); - executor = EsExecutors.newScaling("test", 1, maxThreads, 0, TimeUnit.MILLISECONDS, false, threadFactory, threadContext); + executor = EsExecutors.newScaling("test", maxThreads, maxThreads, 0, TimeUnit.MILLISECONDS, false, threadFactory, threadContext); } @Override @@ -144,7 +144,7 @@ public void onResponse(Releasable releasable) { public void testFailsTasksOnRejectionOrShutdown() throws Exception { final var executor = randomBoolean() - ? EsExecutors.newScaling("test", 1, maxThreads, 0, TimeUnit.MILLISECONDS, true, threadFactory, threadContext) + ? EsExecutors.newScaling("test", maxThreads, maxThreads, 0, TimeUnit.MILLISECONDS, true, threadFactory, threadContext) : EsExecutors.newFixed("test", maxThreads, between(1, 5), threadFactory, threadContext, false); final var totalPermits = between(1, maxThreads * 2);