diff --git a/server/src/internalClusterTest/java/org/opensearch/discovery/single/SingleNodeDiscoveryIT.java b/server/src/internalClusterTest/java/org/opensearch/discovery/single/SingleNodeDiscoveryIT.java index 59e257ae47a44..90bdcf7fded11 100644 --- a/server/src/internalClusterTest/java/org/opensearch/discovery/single/SingleNodeDiscoveryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/discovery/single/SingleNodeDiscoveryIT.java @@ -114,7 +114,6 @@ public Path nodeConfigPath(int nodeOrdinal) { assertThat(second.nodes().getSize(), equalTo(1)); assertThat(first.nodes().getClusterManagerNodeId(), not(equalTo(second.nodes().getClusterManagerNodeId()))); assertThat(first.metadata().clusterUUID(), not(equalTo(second.metadata().clusterUUID()))); - internalCluster().stopNodesAndClients(); } } @@ -179,7 +178,6 @@ public Path nodeConfigPath(int nodeOrdinal) { final ClusterState first = internalCluster().getInstance(ClusterService.class).state(); assertThat(first.nodes().getSize(), equalTo(1)); assertBusy(() -> mockAppender.assertAllExpectationsMatched()); - internalCluster().stopNodesAndClients(); } } } diff --git a/test/framework/src/main/java/org/opensearch/test/InternalTestCluster.java b/test/framework/src/main/java/org/opensearch/test/InternalTestCluster.java index 5057c9f85affb..95832dc9544ce 100644 --- a/test/framework/src/main/java/org/opensearch/test/InternalTestCluster.java +++ b/test/framework/src/main/java/org/opensearch/test/InternalTestCluster.java @@ -1915,10 +1915,6 @@ private void stopNodesAndClient(NodeAndClient nodeAndClient) throws IOException stopNodesAndClients(Collections.singleton(nodeAndClient)); } - public void stopNodesAndClients() throws IOException { - stopNodesAndClients(nodes.values()); - } - private synchronized void stopNodesAndClients(Collection nodeAndClients) throws IOException { final Set excludedNodeIds = excludeClusterManagers(nodeAndClients); diff --git a/test/framework/src/main/java/org/opensearch/test/OpenSearchIntegTestCase.java b/test/framework/src/main/java/org/opensearch/test/OpenSearchIntegTestCase.java index 63fe5ec03b059..f06a6e26defeb 100644 --- a/test/framework/src/main/java/org/opensearch/test/OpenSearchIntegTestCase.java +++ b/test/framework/src/main/java/org/opensearch/test/OpenSearchIntegTestCase.java @@ -157,6 +157,7 @@ import org.opensearch.test.disruption.ServiceDisruptionScheme; import org.opensearch.test.store.MockFSIndexStore; import org.opensearch.test.telemetry.MockTelemetryPlugin; +import org.opensearch.test.telemetry.tracing.StrictCheckSpanProcessor; import org.opensearch.test.transport.MockTransportService; import org.opensearch.transport.TransportInterceptor; import org.opensearch.transport.TransportRequest; @@ -2295,7 +2296,9 @@ public static void afterClass() throws Exception { INSTANCE.printTestMessage("cleaning up after"); INSTANCE.afterInternal(true); checkStaticState(true); + StrictCheckSpanProcessor.validateTracingStateOnShutdown(); } + } finally { SUITE_SEED = null; currentCluster = null; diff --git a/test/framework/src/main/java/org/opensearch/test/OpenSearchTestCase.java b/test/framework/src/main/java/org/opensearch/test/OpenSearchTestCase.java index 7346cb8537fa3..8490ee4fc39bc 100644 --- a/test/framework/src/main/java/org/opensearch/test/OpenSearchTestCase.java +++ b/test/framework/src/main/java/org/opensearch/test/OpenSearchTestCase.java @@ -130,7 +130,6 @@ import org.opensearch.search.MockSearchService; import org.opensearch.test.junit.listeners.LoggingListener; import org.opensearch.test.junit.listeners.ReproduceInfoPrinter; -import org.opensearch.test.telemetry.tracing.StrictCheckSpanProcessor; import org.opensearch.threadpool.ThreadPool; import org.opensearch.transport.TransportService; import org.opensearch.transport.nio.MockNioTransportPlugin; @@ -627,7 +626,6 @@ public void log(StatusData data) { protected static void checkStaticState(boolean afterClass) throws Exception { if (afterClass) { MockPageCacheRecycler.ensureAllPagesAreReleased(); - StrictCheckSpanProcessor.validateTracingStateOnShutdown(); } MockBigArrays.ensureAllArraysAreReleased();