diff --git a/server/src/test/java/org/opensearch/cluster/routing/remote/RemoteRoutingTableServiceFactoryTests.java b/server/src/test/java/org/opensearch/cluster/routing/remote/RemoteRoutingTableServiceFactoryTests.java index 54122c167778d..39294ee8da41e 100644 --- a/server/src/test/java/org/opensearch/cluster/routing/remote/RemoteRoutingTableServiceFactoryTests.java +++ b/server/src/test/java/org/opensearch/cluster/routing/remote/RemoteRoutingTableServiceFactoryTests.java @@ -16,6 +16,7 @@ import org.opensearch.test.OpenSearchTestCase; import org.opensearch.threadpool.TestThreadPool; import org.opensearch.threadpool.ThreadPool; +import org.junit.After; import java.util.function.Supplier; @@ -27,6 +28,12 @@ public class RemoteRoutingTableServiceFactoryTests extends OpenSearchTestCase { Supplier repositoriesService; private ThreadPool threadPool = new TestThreadPool(getClass().getName()); + @After + public void teardown() throws Exception { + super.tearDown(); + threadPool.shutdown(); + } + public void testGetServiceWhenRemoteRoutingDisabled() { Settings settings = Settings.builder().build(); RemoteRoutingTableService service = RemoteRoutingTableServiceFactory.getService( @@ -53,4 +60,5 @@ public void testGetServiceWhenRemoteRoutingEnabled() { ); assertTrue(service instanceof InternalRemoteRoutingTableService); } + }