Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: pranikum <109206473+pranikum@users.noreply.github.com>
  • Loading branch information
pranikum committed Sep 26, 2022
1 parent eeed711 commit ed1ccbc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ void setWeightForDecommissionedZone(List<String> zones, ActionListener<ClusterPu

Map<String, String> weights = new HashMap<>();
zones.forEach(zone -> {
if (zone.equalsIgnoreCase(decommissionAttribute.attributeName())) {
if (zone.equalsIgnoreCase(decommissionAttribute.attributeValue())) {
weights.put(zone, "0");
} else {
weights.put(zone, "1");
Expand All @@ -297,7 +297,7 @@ void setWeightForDecommissionedZone(List<String> zones, ActionListener<ClusterPu

// WRR API will validate invalid weights
final ClusterPutWRRWeightsRequest clusterWeightRequest = new ClusterPutWRRWeightsRequest();
clusterWeightRequest.attributeName(decommissionAttribute.attributeValue());
clusterWeightRequest.attributeName(decommissionAttribute.attributeName());
clusterWeightRequest.setWRRWeight(weights);

transportService.sendRequest(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ public void testSetWeightsForDecommission() {

DecommissionAttributeMetadata oldMetadata = new DecommissionAttributeMetadata(
new DecommissionAttribute("zone", "zone-1"),
DecommissionStatus.IN_PROGRESS
DecommissionStatus.WEIGH_AWAY
);
ClusterState state = clusterService.state();
Metadata metadata = state.metadata();
Expand Down

0 comments on commit ed1ccbc

Please sign in to comment.