Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
Signed-off-by: Rishab Nahata <rnnahata@amazon.com>
  • Loading branch information
imRishN committed Nov 18, 2022
1 parent 7e7aa43 commit 10fc0c4
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
public class AwarenessAttributeDecommissionRestIT extends HttpSmokeTestCase{

public void testRestStatusForDecommissioningFailedException() {
internalCluster().startNodes(3);
Request request = new Request("PUT", "/_cluster/decommission/awareness/zone/zone-1");
ResponseException exception = expectThrows(
ResponseException.class,
() -> getRestClient().performRequest(request)
);
assertEquals(exception.getResponse().getStatusLine().getStatusCode(), RestStatus.BAD_REQUEST.getStatus());
assertTrue(exception.getMessage().contains("invalid awareness attribute requested for decommissioning"));
internalCluster().startNodes(3);
Request request = new Request("PUT", "/_cluster/decommission/awareness/zone/zone-1");
ResponseException exception = expectThrows(
ResponseException.class,
() -> getRestClient().performRequest(request)
);
assertEquals(exception.getResponse().getStatusLine().getStatusCode(), RestStatus.BAD_REQUEST.getStatus());
assertTrue(exception.getMessage().contains("invalid awareness attribute requested for decommissioning"));
}

public void testRestStatusForAcknowledgedDecommission() throws IOException {
Expand Down

0 comments on commit 10fc0c4

Please sign in to comment.