Skip to content

Commit a7bf06e

Browse files
committed
Fix test bug in UpdateThreadPoolSettingsTests.
1 parent d819930 commit a7bf06e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

core/src/test/java/org/elasticsearch/threadpool/UpdateThreadPoolSettingsTests.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,13 @@ public void testCorrectThreadPoolTypePermittedInSettings() throws InterruptedExc
4949
.put("name", "testCorrectThreadPoolTypePermittedInSettings")
5050
.put("threadpool." + threadPoolName + ".type", correctThreadPoolType.getType())
5151
.build());
52-
assertEquals(info(threadPool, threadPoolName).getThreadPoolType(), correctThreadPoolType);
52+
ThreadPool.Info info = info(threadPool, threadPoolName);
53+
if (ThreadPool.Names.SAME.equals(threadPoolName)) {
54+
assertNull(info); // we don't report on the "same" threadpool
55+
} else {
56+
// otherwise check we have the expected type
57+
assertEquals(info.getThreadPoolType(), correctThreadPoolType);
58+
}
5359
} finally {
5460
terminateThreadPoolIfNeeded(threadPool);
5561
}

0 commit comments

Comments
 (0)