Skip to content

Commit 8aa1b9d

Browse files
committed
AbstractThrottledTaskRunnerTests needs all-core threads
The same fix as in elastic#93446, which was missed in elastic#93436
1 parent c08c16e commit 8aa1b9d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/test/java/org/elasticsearch/common/util/concurrent/AbstractThrottledTaskRunnerTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class AbstractThrottledTaskRunnerTests extends ESTestCase {
3636
public void setUp() throws Exception {
3737
super.setUp();
3838
maxThreads = between(1, 10);
39-
executor = EsExecutors.newScaling("test", 1, maxThreads, 0, TimeUnit.MILLISECONDS, false, threadFactory, threadContext);
39+
executor = EsExecutors.newScaling("test", maxThreads, maxThreads, 0, TimeUnit.MILLISECONDS, false, threadFactory, threadContext);
4040
}
4141

4242
@Override
@@ -144,7 +144,7 @@ public void onResponse(Releasable releasable) {
144144

145145
public void testFailsTasksOnRejectionOrShutdown() throws Exception {
146146
final var executor = randomBoolean()
147-
? EsExecutors.newScaling("test", 1, maxThreads, 0, TimeUnit.MILLISECONDS, true, threadFactory, threadContext)
147+
? EsExecutors.newScaling("test", maxThreads, maxThreads, 0, TimeUnit.MILLISECONDS, true, threadFactory, threadContext)
148148
: EsExecutors.newFixed("test", maxThreads, between(1, 5), threadFactory, threadContext, false);
149149

150150
final var totalPermits = between(1, maxThreads * 2);

0 commit comments

Comments
 (0)