Skip to content

Commit

Permalink
Test 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 Jan 10, 2023
1 parent a6d0c3b commit 927d0cc
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -343,17 +343,19 @@ public void testScheduleNodesDecommissionOnTimeout() {

public void testDrainNodesWithDecommissionedAttributeWithNoDelay() {
DecommissionAttribute decommissionAttribute = new DecommissionAttribute("zone", "zone-2");
String requestID = randomAlphaOfLength(10);
DecommissionAttributeMetadata decommissionAttributeMetadata = new DecommissionAttributeMetadata(
decommissionAttribute,
DecommissionStatus.INIT,
randomAlphaOfLength(10)
requestID
);

Metadata metadata = Metadata.builder().putCustom(DecommissionAttributeMetadata.TYPE, decommissionAttributeMetadata).build();
ClusterState state = ClusterState.builder(new ClusterName("test")).metadata(metadata).build();

DecommissionRequest request = new DecommissionRequest(decommissionAttribute);
request.setNoDelay(true);
request.setRequestID(requestID);

setState(clusterService, state);
decommissionService.drainNodesWithDecommissionedAttribute(request);
Expand Down

0 comments on commit 927d0cc

Please sign in to comment.