Skip to content

Commit

Permalink
spotless apply
Browse files Browse the repository at this point in the history
Signed-off-by: bfindlay <bfindlay@acm.org>
  • Loading branch information
Bfindlay committed Dec 1, 2023
1 parent 6a72287 commit 0a98803
Showing 1 changed file with 16 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import java.io.IOException;
import java.util.Arrays;
import org.junit.Test;
import org.opensearch.client.opensearch._types.OpenSearchException;
import org.opensearch.client.opensearch.nodes.NodesStatsResponse;
import org.opensearch.client.opensearch.tasks.ListRequest;
import org.opensearch.client.opensearch.tasks.ListResponse;
Expand All @@ -35,49 +34,49 @@ public void testNodesList() throws IOException {

@Test
public void stats_fsMetricRequested_returnsFsStatsWithoutException() throws IOException {
final NodesStatsResponse statsResponse = javaClient().nodes().stats(s -> s.metric("fs"));
statsResponse.nodes().values().forEach((v) -> { assertNotNull(v.fs()); });
final NodesStatsResponse statsResponse = javaClient().nodes().stats(s -> s.metric("fs"));
statsResponse.nodes().values().forEach((v) -> { assertNotNull(v.fs()); });
}

@Test
public void stats_httpMetricRequested_returnsHttpStatsWithoutException() throws IOException {
final NodesStatsResponse statsResponse = javaClient().nodes().stats(s -> s.metric("http"));
statsResponse.nodes().values().forEach((v) -> { assertNotNull(v.http()); });
final NodesStatsResponse statsResponse = javaClient().nodes().stats(s -> s.metric("http"));
statsResponse.nodes().values().forEach((v) -> { assertNotNull(v.http()); });
}

@Test
public void stats_indicesMetricRequested_returnsIndicesStatsWithoutException() throws IOException {
final NodesStatsResponse statsResponse = javaClient().nodes().stats(s -> s.metric("indices"));
statsResponse.nodes().values().forEach((v) -> { assertNotNull(v.indices()); });
final NodesStatsResponse statsResponse = javaClient().nodes().stats(s -> s.metric("indices"));
statsResponse.nodes().values().forEach((v) -> { assertNotNull(v.indices()); });
}

@Test
public void stats_ingestMetricRequested_returnsIngestStatsWithoutException() throws IOException {
final NodesStatsResponse statsResponse = javaClient().nodes().stats(s -> s.metric("ingest"));
statsResponse.nodes().values().forEach((v) -> { assertNotNull(v.ingest()); });
final NodesStatsResponse statsResponse = javaClient().nodes().stats(s -> s.metric("ingest"));
statsResponse.nodes().values().forEach((v) -> { assertNotNull(v.ingest()); });
}

@Test
public void stats_jvmMetricRequested_returnsJvmStatsWithoutException() throws IOException {
final NodesStatsResponse statsResponse = javaClient().nodes().stats(s -> s.metric("jvm"));
statsResponse.nodes().values().forEach((v) -> { assertNotNull(v.jvm()); });
final NodesStatsResponse statsResponse = javaClient().nodes().stats(s -> s.metric("jvm"));
statsResponse.nodes().values().forEach((v) -> { assertNotNull(v.jvm()); });
}

@Test
public void stats_osMetricRequested_returnsOsStatsWithoutException() throws IOException {
final NodesStatsResponse statsResponse = javaClient().nodes().stats(s -> s.metric("os"));
statsResponse.nodes().values().forEach((v) -> { assertNotNull(v.os()); });
final NodesStatsResponse statsResponse = javaClient().nodes().stats(s -> s.metric("os"));
statsResponse.nodes().values().forEach((v) -> { assertNotNull(v.os()); });
}

@Test
public void stats_processMetricRequested_returnsProcessStatsWithoutException() throws IOException {
final NodesStatsResponse statsResponse = javaClient().nodes().stats(s -> s.metric("process"));
statsResponse.nodes().values().forEach((v) -> { assertNotNull(v.process()); });
final NodesStatsResponse statsResponse = javaClient().nodes().stats(s -> s.metric("process"));
statsResponse.nodes().values().forEach((v) -> { assertNotNull(v.process()); });
}

@Test
public void stats_scriptMetricRequested_returnsScriptStatsWithoutException() throws IOException {
final NodesStatsResponse statsResponse = javaClient().nodes().stats(s -> s.metric("script"));
statsResponse.nodes().values().forEach((v) -> { assertNotNull(v.script()); });
final NodesStatsResponse statsResponse = javaClient().nodes().stats(s -> s.metric("script"));
statsResponse.nodes().values().forEach((v) -> { assertNotNull(v.script()); });
}
}

0 comments on commit 0a98803

Please sign in to comment.