diff --git a/src/test/java/org/opensearch/plugin/insights/QueryInsightsRestTestCase.java b/src/test/java/org/opensearch/plugin/insights/QueryInsightsRestTestCase.java index bcc64ff..b7e73e0 100644 --- a/src/test/java/org/opensearch/plugin/insights/QueryInsightsRestTestCase.java +++ b/src/test/java/org/opensearch/plugin/insights/QueryInsightsRestTestCase.java @@ -348,7 +348,7 @@ protected String getTopQueries(String type) throws IOException { String endpoint = "/_insights/top_queries?pretty"; if (type != null) { - switch (type.toLowerCase()) { + switch (type) { case "cpu": case "memory": case "latency": @@ -372,7 +372,6 @@ protected String getTopQueries(String type) throws IOException { return responseBody; } - protected void updateClusterSettings(Supplier settingsSupplier) throws IOException { Request request = new Request("PUT", "/_cluster/settings"); request.setJsonEntity(settingsSupplier.get()); diff --git a/src/test/java/org/opensearch/plugin/insights/core/service/grouper/MinMaxQueryGrouperByNoneIT.java b/src/test/java/org/opensearch/plugin/insights/core/service/grouper/MinMaxQueryGrouperByNoneIT.java index 16bee79..6fd2083 100644 --- a/src/test/java/org/opensearch/plugin/insights/core/service/grouper/MinMaxQueryGrouperByNoneIT.java +++ b/src/test/java/org/opensearch/plugin/insights/core/service/grouper/MinMaxQueryGrouperByNoneIT.java @@ -8,9 +8,7 @@ package org.opensearch.plugin.insights.core.service.grouper; import java.io.IOException; -import org.junit.Assert; import org.opensearch.plugin.insights.QueryInsightsRestTestCase; -import org.opensearch.plugin.insights.settings.QueryInsightsSettings; /** * ITs for Grouping Top Queries by none diff --git a/src/test/java/org/opensearch/plugin/insights/core/service/grouper/MinMaxQueryGrouperBySimilarityIT.java b/src/test/java/org/opensearch/plugin/insights/core/service/grouper/MinMaxQueryGrouperBySimilarityIT.java index 0f4bbd2..069ea43 100644 --- a/src/test/java/org/opensearch/plugin/insights/core/service/grouper/MinMaxQueryGrouperBySimilarityIT.java +++ b/src/test/java/org/opensearch/plugin/insights/core/service/grouper/MinMaxQueryGrouperBySimilarityIT.java @@ -8,12 +8,10 @@ package org.opensearch.plugin.insights.core.service.grouper; import java.io.IOException; -import org.junit.Assert; import org.opensearch.client.Request; import org.opensearch.client.Response; import org.opensearch.client.ResponseException; import org.opensearch.plugin.insights.QueryInsightsRestTestCase; -import org.opensearch.plugin.insights.settings.QueryInsightsSettings; /** * ITs for Grouping Top Queries by similarity diff --git a/src/test/java/org/opensearch/plugin/insights/core/service/grouper/MinMaxQueryGrouperIT.java b/src/test/java/org/opensearch/plugin/insights/core/service/grouper/MinMaxQueryGrouperIT.java index 2d7d7b2..12389b6 100644 --- a/src/test/java/org/opensearch/plugin/insights/core/service/grouper/MinMaxQueryGrouperIT.java +++ b/src/test/java/org/opensearch/plugin/insights/core/service/grouper/MinMaxQueryGrouperIT.java @@ -1,10 +1,14 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ package org.opensearch.plugin.insights.core.service.grouper; -import org.junit.Assert; -import org.opensearch.plugin.insights.QueryInsightsRestTestCase; -import org.opensearch.plugin.insights.settings.QueryInsightsSettings; - import java.io.IOException; +import org.opensearch.plugin.insights.QueryInsightsRestTestCase; public class MinMaxQueryGrouperIT extends QueryInsightsRestTestCase { /** diff --git a/src/test/java/org/opensearch/plugin/insights/rules/resthandler/top_queries/TopQueriesRestIT.java b/src/test/java/org/opensearch/plugin/insights/rules/resthandler/top_queries/TopQueriesRestIT.java index e6c87ec..b2d188d 100644 --- a/src/test/java/org/opensearch/plugin/insights/rules/resthandler/top_queries/TopQueriesRestIT.java +++ b/src/test/java/org/opensearch/plugin/insights/rules/resthandler/top_queries/TopQueriesRestIT.java @@ -11,8 +11,6 @@ import java.io.IOException; import java.util.List; import java.util.Map; -import java.util.Optional; - import org.junit.Assert; import org.opensearch.client.Request; import org.opensearch.client.Response; @@ -21,7 +19,6 @@ import org.opensearch.common.xcontent.json.JsonXContent; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.plugin.insights.QueryInsightsRestTestCase; -import org.opensearch.plugin.insights.settings.QueryInsightsSettings; /** Rest Action tests for Top Queries */ public class TopQueriesRestIT extends QueryInsightsRestTestCase {