Skip to content

Commit

Permalink
Fix test bug in UpdateThreadPoolSettingsTests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpountz committed Nov 3, 2015
1 parent d819930 commit a7bf06e
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,13 @@ public void testCorrectThreadPoolTypePermittedInSettings() throws InterruptedExc
.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);
}
Expand Down

0 comments on commit a7bf06e

Please sign in to comment.