Skip to content

Commit 6fc953f

Browse files
committed
Add back test
1 parent df0e5fb commit 6fc953f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/WriteLoadConstraintDeciderTests.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,16 @@ public void testWriteLoadDeciderCanRemain() {
233233
testHarness.routingAllocation
234234
).type()
235235
);
236+
assertEquals(
237+
"A shard with no write load can still return NOT_PREFERRED",
238+
Decision.Type.NOT_PREFERRED,
239+
writeLoadDecider.canRemain(
240+
testHarness.clusterState.metadata().getProject().index(indexName),
241+
testHarness.shardRoutingNoWriteLoad,
242+
testHarness.aboveQueuingThresholdRoutingNode,
243+
testHarness.routingAllocation
244+
).type()
245+
);
236246
}
237247

238248
private void assertDecisionMatches(String description, Decision decision, Decision.Type type, String explanationPattern) {

0 commit comments

Comments
 (0)