Fix test bug in UpdateThreadPoolSettingsTests.

This commit is contained in:
Adrien Grand 2015-11-03 11:35:47 +01:00
parent d819930261
commit a7bf06ee3a
1 changed files with 7 additions and 1 deletions

View File

@ -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);
}