Skip to content

Commit

Permalink
Adjust format by spotlessApply task
Browse files Browse the repository at this point in the history
Signed-off-by: Tianli Feng <ftianli@amazon.com>
  • Loading branch information
Tianli Feng committed Apr 2, 2022
1 parent 33556a4 commit f5d9fc7
Showing 1 changed file with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ public void testCatSegments() {

public void testClusterHealth() {
Exception e = assertThrows(
OpenSearchParseException.class,
() -> RestClusterHealthAction.fromRequest(getRestRequestWithBodyWithBothParams())
OpenSearchParseException.class,
() -> RestClusterHealthAction.fromRequest(getRestRequestWithBodyWithBothParams())
);
assertThat(e.getMessage(), containsString(DUPLICATE_PARAMETER_ERROR_MESSAGE));
assertWarnings(MASTER_TIMEOUT_DEPRECATED_MESSAGE);
Expand All @@ -204,8 +204,8 @@ public void testClusterReroute() throws IOException {
final SettingsFilter filter = new SettingsFilter(Collections.singleton("foo.filtered"));
RestClusterRerouteAction action = new RestClusterRerouteAction(filter);
Exception e = assertThrows(
OpenSearchParseException.class,
() -> action.prepareRequest(getRestRequestWithBodyWithBothParams(), client)
OpenSearchParseException.class,
() -> action.prepareRequest(getRestRequestWithBodyWithBothParams(), client)
);
assertThat(e.getMessage(), containsString(DUPLICATE_PARAMETER_ERROR_MESSAGE));
assertWarnings(MASTER_TIMEOUT_DEPRECATED_MESSAGE);
Expand All @@ -215,8 +215,8 @@ public void testClusterState() throws IOException {
final SettingsFilter filter = new SettingsFilter(Collections.singleton("foo.filtered"));
RestClusterStateAction action = new RestClusterStateAction(filter);
Exception e = assertThrows(
OpenSearchParseException.class,
() -> action.prepareRequest(getRestRequestWithBodyWithBothParams(), client)
OpenSearchParseException.class,
() -> action.prepareRequest(getRestRequestWithBodyWithBothParams(), client)
);
assertThat(e.getMessage(), containsString(DUPLICATE_PARAMETER_ERROR_MESSAGE));
assertWarnings(MASTER_TIMEOUT_DEPRECATED_MESSAGE);
Expand All @@ -226,8 +226,8 @@ public void testClusterGetSettings() throws IOException {
final SettingsFilter filter = new SettingsFilter(Collections.singleton("foo.filtered"));
RestClusterGetSettingsAction action = new RestClusterGetSettingsAction(null, null, filter);
Exception e = assertThrows(
OpenSearchParseException.class,
() -> action.prepareRequest(getRestRequestWithBodyWithBothParams(), client)
OpenSearchParseException.class,
() -> action.prepareRequest(getRestRequestWithBodyWithBothParams(), client)
);
assertThat(e.getMessage(), containsString(DUPLICATE_PARAMETER_ERROR_MESSAGE));
assertWarnings(MASTER_TIMEOUT_DEPRECATED_MESSAGE);
Expand All @@ -236,23 +236,23 @@ public void testClusterGetSettings() throws IOException {
public void testClusterUpdateSettings() throws IOException {
RestClusterUpdateSettingsAction action = new RestClusterUpdateSettingsAction();
Exception e = assertThrows(
OpenSearchParseException.class,
() -> action.prepareRequest(getRestRequestWithBodyWithBothParams(), client)
OpenSearchParseException.class,
() -> action.prepareRequest(getRestRequestWithBodyWithBothParams(), client)
);
assertThat(e.getMessage(), containsString(DUPLICATE_PARAMETER_ERROR_MESSAGE));
assertWarnings(MASTER_TIMEOUT_DEPRECATED_MESSAGE);
}

public void testClusterPendingTasks() {
org.opensearch.rest.action.admin.cluster.RestPendingClusterTasksAction action = new org.opensearch.rest.action.admin.cluster.RestPendingClusterTasksAction();
RestPendingClusterTasksAction action = new RestPendingClusterTasksAction();
Exception e = assertThrows(
OpenSearchParseException.class,
() -> action.prepareRequest(getRestRequestWithBodyWithBothParams(), client)
OpenSearchParseException.class,
() -> action.prepareRequest(getRestRequestWithBodyWithBothParams(), client)
);
assertThat(e.getMessage(), containsString(DUPLICATE_PARAMETER_ERROR_MESSAGE));
assertWarnings(MASTER_TIMEOUT_DEPRECATED_MESSAGE);
}

private MasterNodeRequest getMasterNodeRequest() {
return new MasterNodeRequest() {
@Override
Expand Down

0 comments on commit f5d9fc7

Please sign in to comment.