From 3f2411ee1130085ef4fd76bb0bd2c045dd1ed5a6 Mon Sep 17 00:00:00 2001 From: jaymode Date: Wed, 14 Oct 2020 12:31:54 -0600 Subject: [PATCH] Fix threadpool setting test for system_write This commit fixes the UpdateThreadPoolSettingsTests to be aware of the hard limit on the maximum size of the system_write executor. This executor has a hard limit that matches the write executor, which is the number of allocated processors. Closes #63131 --- .../elasticsearch/threadpool/UpdateThreadPoolSettingsTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/test/java/org/elasticsearch/threadpool/UpdateThreadPoolSettingsTests.java b/server/src/test/java/org/elasticsearch/threadpool/UpdateThreadPoolSettingsTests.java index 3a50bf7b49df0..36ddfd6c03589 100644 --- a/server/src/test/java/org/elasticsearch/threadpool/UpdateThreadPoolSettingsTests.java +++ b/server/src/test/java/org/elasticsearch/threadpool/UpdateThreadPoolSettingsTests.java @@ -87,7 +87,7 @@ public void testWriteThreadPoolsMaxSize() throws InterruptedException { } private static int getExpectedThreadPoolSize(Settings settings, String name, int size) { - if (name.equals(ThreadPool.Names.WRITE)) { + if (name.equals(ThreadPool.Names.WRITE) || name.equals(Names.SYSTEM_WRITE)) { return Math.min(size, EsExecutors.allocatedProcessors(settings)); } else { return size;