Skip to content

Commit

Permalink
Add tearDown
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks committed Dec 5, 2024
1 parent 4bdf148 commit 18bb988
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import org.opensearch.common.unit.TimeValue;
import org.opensearch.core.common.Strings;
import org.opensearch.test.OpenSearchTestCase;
import org.junit.After;
import org.junit.AfterClass;

import java.io.IOException;
Expand All @@ -58,6 +59,7 @@
import java.util.Map;

import reactor.core.scheduler.Schedulers;
import reactor.netty.http.HttpResources;

import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.emptyString;
Expand All @@ -72,6 +74,16 @@ public static void shutdownSchedulers() {
Schedulers.shutdownNow();
}

@After
public void tearDown() throws Exception {
try {
// Properly shut down resources
HttpResources.disposeLoopsAndConnectionsLater().block();
} finally {
super.tearDown();
}
}

public void testReadSecuredSettings() {
final Settings settings = Settings.builder()
.setSecureSettings(buildSecureSettings())
Expand Down

0 comments on commit 18bb988

Please sign in to comment.