Skip to content

Commit

Permalink
Add Tear down for tests
Browse files Browse the repository at this point in the history
Signed-off-by: Sooraj Sinha <[email protected]>
  • Loading branch information
soosinha committed Jun 11, 2024
1 parent 0391436 commit 7a05c8e
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -27,6 +28,12 @@ public class RemoteRoutingTableServiceFactoryTests extends OpenSearchTestCase {
Supplier<RepositoriesService> 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(
Expand All @@ -53,4 +60,5 @@ public void testGetServiceWhenRemoteRoutingEnabled() {
);
assertTrue(service instanceof InternalRemoteRoutingTableService);
}

}

0 comments on commit 7a05c8e

Please sign in to comment.