Skip to content

Commit

Permalink
fixing thread leak in UT
Browse files Browse the repository at this point in the history
Signed-off-by: Himshikha Gupta <[email protected]>
  • Loading branch information
Himshikha Gupta committed Sep 25, 2024
1 parent cc43b33 commit 80d0890
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import org.opensearch.test.OpenSearchTestCase;
import org.opensearch.threadpool.TestThreadPool;
import org.opensearch.threadpool.ThreadPool;
import org.junit.AfterClass;
import org.junit.After;

import java.io.IOException;
import java.util.ArrayList;
Expand Down Expand Up @@ -67,10 +67,11 @@

public class ClusterMetadataManifestTests extends OpenSearchTestCase {

private static final ThreadPool threadPool = new TestThreadPool(ClusterMetadataManifestTests.class.getName());
private final ThreadPool threadPool = new TestThreadPool(getClass().getName());

@AfterClass
public static void shutdown() throws Exception {
@After
public void teardown() throws Exception {
super.tearDown();
threadPool.shutdown();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,19 @@
import org.opensearch.test.OpenSearchTestCase;
import org.opensearch.threadpool.TestThreadPool;
import org.opensearch.threadpool.ThreadPool;
import org.junit.AfterClass;
import org.junit.After;

import java.io.IOException;
import java.util.EnumSet;
import java.util.List;
import java.util.Map;

public class ClusterStateChecksumTests extends OpenSearchTestCase {
private static final ThreadPool threadPool = new TestThreadPool(ClusterStateChecksumTests.class.getName());
private final ThreadPool threadPool = new TestThreadPool(getClass().getName());

@AfterClass
public static void shutdown() throws Exception {
@After
public void teardown() throws Exception {
super.tearDown();
threadPool.shutdown();
}

Expand Down

0 comments on commit 80d0890

Please sign in to comment.