浏览代码

Fix threadpool setting test for system_write (#63700)

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
Jay Modi 5 年之前
父节点
当前提交
b33cfa5083
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      server/src/test/java/org/elasticsearch/threadpool/UpdateThreadPoolSettingsTests.java

+ 1 - 1
server/src/test/java/org/elasticsearch/threadpool/UpdateThreadPoolSettingsTests.java

@@ -87,7 +87,7 @@ public class UpdateThreadPoolSettingsTests extends ESThreadPoolTestCase {
     }
     }
 
 
     private static int getExpectedThreadPoolSize(Settings settings, String name, int size) {
     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));
             return Math.min(size, EsExecutors.allocatedProcessors(settings));
         } else {
         } else {
             return size;
             return size;