Skip to content

Commit

Permalink
Test sequence of updates (#28309)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbismuth committed Oct 4, 2018
1 parent 5a84c18 commit 71cfe1a
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,4 +203,20 @@ public void testInvalidHighDiskThreshold() {
assertThat(cause, hasToString(containsString("low disk watermark [85%] more than high disk watermark [75%]")));
}

public void testSequenceOfUpdates() {
Settings settings = Settings.EMPTY;

final ClusterSettings clusterSettings = new ClusterSettings(settings, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS);
new DiskThresholdSettings(settings, clusterSettings); // this has the effect of registering the settings updater

settings = clusterSettings.applySettings(Settings.builder()
.put(settings)
.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_DISK_FLOOD_STAGE_WATERMARK_SETTING.getKey(), "99%")
.build());
settings = clusterSettings.applySettings(Settings.builder()
.put(settings)
.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_HIGH_DISK_WATERMARK_SETTING.getKey(), "97%")
.build());
}

}

0 comments on commit 71cfe1a

Please sign in to comment.