Skip to content

Commit

Permalink
Fix testIsNotTierOnlyDecision (#74475)
Browse files Browse the repository at this point in the history
The test would fail 2 percent of the time due to using the same-shard
allocation decider to make it a "not tier only decision". That decider
is however ignored here and the test has been adjusted to not use that
decider.

Related to #74086
  • Loading branch information
henningandersen committed Jun 23, 2021
1 parent 47c8b52 commit 0637218
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,13 @@ public void testIsNotTierOnlyDecision() {
decision.add(new Decision.Single(Decision.Type.NO, DataTierAllocationDecider.NAME, "test"));
}
} else {
decision.add(new Decision.Single(Decision.Type.NO, randomFrom(SOME_ALLOCATION_DECIDERS), "test"));
decision.add(
new Decision.Single(
Decision.Type.NO,
randomValueOtherThan(SameShardAllocationDecider.NAME, () -> randomFrom(SOME_ALLOCATION_DECIDERS)),
"test"
)
);
}
} else if (randomBoolean()) {
decision.add(new Decision.Single(Decision.Type.YES, FilterAllocationDecider.NAME, "test"));
Expand Down

0 comments on commit 0637218

Please sign in to comment.