Skip to content

Commit

Permalink
optimize _cat/nodes api
Browse files Browse the repository at this point in the history
  • Loading branch information
kkewwei committed Jul 26, 2024
1 parent 46509de commit 930905a
Showing 1 changed file with 0 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@

import org.apache.hc.core5.http.ParseException;
import org.apache.hc.core5.http.io.entity.EntityUtils;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.opensearch.client.Request;
import org.opensearch.client.Response;
import org.opensearch.client.ResponseException;
import org.opensearch.client.RestClient;
import org.opensearch.common.SuppressForbidden;
import org.opensearch.test.OpenSearchIntegTestCase;

import java.io.IOException;
Expand All @@ -27,12 +24,6 @@
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.SUITE, supportsDedicatedMasters = false, numDataNodes = 5, numClientNodes = 0)
public class HttpCatIT extends HttpSmokeTestCase {

@BeforeClass
@SuppressForbidden(reason = "Need to set system property here for the cluster with multi nodes")
public static void doNotSetAvailableProcessors() {
System.setProperty("opensearch.set.netty.runtime.available.processors", "false");
}

public void testdoCatRequest() throws IOException, ParseException {
try (RestClient restClient = getRestClient()) {
int nodesCount = restClient.getNodes().size();
Expand All @@ -52,11 +43,5 @@ public void testdoCatRequest() throws IOException, ParseException {
}
}

@AfterClass
@SuppressForbidden(reason = "Need to reset system property here after test")
public static void doResetAvailableProcessors() {
System.setProperty("opensearch.set.netty.runtime.available.processors", "true");
}

}

0 comments on commit 930905a

Please sign in to comment.