Skip to content

Commit

Permalink
Issue #5994 - QueuedThreadPool "free" threads
Browse files Browse the repository at this point in the history
Updates after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
  • Loading branch information
sbordet committed Feb 23, 2021
1 parent 64e01be commit 530c14e
Show file tree
Hide file tree
Showing 4 changed files with 358 additions and 185 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,13 @@ public void testStoppingContainerDoesNotUnregistersMBeans() throws Exception

String pkg = bean.getClass().getPackage().getName();
Set<ObjectName> objectNames = mbeanServer.queryNames(ObjectName.getInstance(pkg + ":*"), null);
assertEquals(1, objectNames.size());
// QueuedThreadPool and ThreadPoolBudget.
assertEquals(2, objectNames.size());

container.stop();

objectNames = mbeanServer.queryNames(ObjectName.getInstance(pkg + ":*"), null);
assertEquals(1, objectNames.size());
assertEquals(2, objectNames.size());

// Remove the MBeans to start clean on the next test.
objectNames.forEach(objectName ->
Expand All @@ -105,7 +106,8 @@ public void testDestroyingContainerUnregistersMBeans() throws Exception

String pkg = bean.getClass().getPackage().getName();
Set<ObjectName> objectNames = mbeanServer.queryNames(ObjectName.getInstance(pkg + ":*"), null);
assertEquals(1, objectNames.size());
// QueuedThreadPool and ThreadPoolBudget.
assertEquals(2, objectNames.size());

container.stop();
container.destroy();
Expand Down
Loading

0 comments on commit 530c14e

Please sign in to comment.