Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate cleanup for Azure blob tests #16789

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@

import fixture.azure.AzureHttpHandler;
import reactor.core.scheduler.Schedulers;
import reactor.netty.http.HttpResources;

import static java.nio.charset.StandardCharsets.UTF_8;
import static org.opensearch.repositories.azure.AzureRepository.Repository.CONTAINER_SETTING;
Expand Down Expand Up @@ -142,6 +143,7 @@ public void tearDown() throws Exception {

@AfterClass
public static void shutdownSchedulers() {
HttpResources.disposeLoopsAndConnections();
Schedulers.shutdownNow();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import java.util.List;

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

import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.nullValue;
Expand All @@ -57,6 +58,7 @@
public class AzureRepositorySettingsTests extends OpenSearchTestCase {
@AfterClass
public static void shutdownSchedulers() {
HttpResources.disposeLoopsAndConnections();
reta marked this conversation as resolved.
Show resolved Hide resolved
Schedulers.shutdownNow();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
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 Down Expand Up @@ -71,19 +70,10 @@
public class AzureStorageServiceTests extends OpenSearchTestCase {
@AfterClass
public static void shutdownSchedulers() {
HttpResources.disposeLoopsAndConnections();
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
Loading