Skip to content

Commit

Permalink
Do not initialize setting filter for every unit test case
Browse files Browse the repository at this point in the history
Signed-off-by: Tianli Feng <[email protected]>
  • Loading branch information
Tianli Feng committed Mar 30, 2022
1 parent 2fb34ed commit 5b35951
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
public class RenamedTimeoutRequestParameterTests extends OpenSearchTestCase {
private static final TestThreadPool threadPool = new TestThreadPool(RenamedTimeoutRequestParameterTests.class.getName());
private final NodeClient client = new NodeClient(Settings.EMPTY, threadPool);
private final SettingsFilter filter = new SettingsFilter(Collections.singleton("foo.filtered"));

private static final String PARAM_VALUE_ERROR_MESSAGE = "[master_timeout, cluster_manager_timeout] are required to be equal";
private static final String MASTER_TIMEOUT_DEPRECATED_MESSAGE =
Expand Down Expand Up @@ -68,6 +67,7 @@ public void testClusterHealth() {
}

public void testClusterReroute() throws IOException {
final SettingsFilter filter = new SettingsFilter(Collections.singleton("foo.filtered"));
RestClusterRerouteAction action = new RestClusterRerouteAction(filter);

action.prepareRequest(getRestRequestWithNewParam(), client);
Expand All @@ -80,6 +80,7 @@ public void testClusterReroute() throws IOException {
}

public void testClusterState() throws IOException {
final SettingsFilter filter = new SettingsFilter(Collections.singleton("foo.filtered"));
RestClusterStateAction action = new RestClusterStateAction(filter);

action.prepareRequest(getRestRequestWithNewParam(), client);
Expand All @@ -92,6 +93,7 @@ public void testClusterState() throws IOException {
}

public void testClusterGetSettings() throws IOException {
final SettingsFilter filter = new SettingsFilter(Collections.singleton("foo.filtered"));
RestClusterGetSettingsAction action = new RestClusterGetSettingsAction(null, null, filter);

action.prepareRequest(getRestRequestWithNewParam(), client);
Expand Down

0 comments on commit 5b35951

Please sign in to comment.