Skip to content

Commit

Permalink
Keep nodes above watermark in testAutomaticReleaseOfIndexBlock (#47387)
Browse files Browse the repository at this point in the history
Today the comment boldly claims that this line of code keeps nodes above the
10-byte low watermark when in fact this is not true at all. This change fixes
this so that it really does keep nodes above the low watermark.

Fixes #45338. Again.
  • Loading branch information
DaveCTurner authored Oct 1, 2019
1 parent 6ef5300 commit 650c0c6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public void testAutomaticReleaseOfIndexBlock() throws Exception {
// Move all nodes above the low watermark so no shard movement can occur, and at least one node above the flood stage watermark so
// the index is blocked
clusterInfoService.diskUsageFunction = (discoveryNode, fsInfoPath) -> setDiskUsage(fsInfoPath, 100,
discoveryNode.getId().equals(nodeIds.get(2)) ? between(0, 4) : between(0, 14));
discoveryNode.getId().equals(nodeIds.get(2)) ? between(0, 4) : between(0, 9));

assertBusy(() -> assertBlocked(
client().prepareIndex().setIndex("test").setType("doc").setId("1").setSource("foo", "bar"),
Expand Down

0 comments on commit 650c0c6

Please sign in to comment.