From a7bf06ee3a14fc1464fa295eede3898f2f105ce6 Mon Sep 17 00:00:00 2001 From: Adrien Grand Date: Tue, 3 Nov 2015 11:35:47 +0100 Subject: [PATCH] Fix test bug in UpdateThreadPoolSettingsTests. --- .../threadpool/UpdateThreadPoolSettingsTests.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/src/test/java/org/elasticsearch/threadpool/UpdateThreadPoolSettingsTests.java b/core/src/test/java/org/elasticsearch/threadpool/UpdateThreadPoolSettingsTests.java index faa08243af0..95ceea1e490 100644 --- a/core/src/test/java/org/elasticsearch/threadpool/UpdateThreadPoolSettingsTests.java +++ b/core/src/test/java/org/elasticsearch/threadpool/UpdateThreadPoolSettingsTests.java @@ -49,7 +49,13 @@ public class UpdateThreadPoolSettingsTests extends ESTestCase { .put("name", "testCorrectThreadPoolTypePermittedInSettings") .put("threadpool." + threadPoolName + ".type", correctThreadPoolType.getType()) .build()); - assertEquals(info(threadPool, threadPoolName).getThreadPoolType(), correctThreadPoolType); + ThreadPool.Info info = info(threadPool, threadPoolName); + if (ThreadPool.Names.SAME.equals(threadPoolName)) { + assertNull(info); // we don't report on the "same" threadpool + } else { + // otherwise check we have the expected type + assertEquals(info.getThreadPoolType(), correctThreadPoolType); + } } finally { terminateThreadPoolIfNeeded(threadPool); }