From 18bb988eecc9b9b124026694f36703d616b2c80e Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Wed, 4 Dec 2024 21:42:40 -0500 Subject: [PATCH] Add tearDown Signed-off-by: Craig Perkins --- .../repositories/azure/AzureStorageServiceTests.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/plugins/repository-azure/src/test/java/org/opensearch/repositories/azure/AzureStorageServiceTests.java b/plugins/repository-azure/src/test/java/org/opensearch/repositories/azure/AzureStorageServiceTests.java index ea74a49e593cf..9cff5bc2c30f1 100644 --- a/plugins/repository-azure/src/test/java/org/opensearch/repositories/azure/AzureStorageServiceTests.java +++ b/plugins/repository-azure/src/test/java/org/opensearch/repositories/azure/AzureStorageServiceTests.java @@ -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; @@ -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; @@ -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())