Skip to content

Commit b15098a

Browse files
authored
Fix ReactiveStorageDeciderDecisionTests (#93230)
After #93075 the first settings parameter in ClusterModule#createAllocationDeciders are expected to be the same settings that ClusterSettings contain, this was not the case for this test and some of the allocator deciders used the default config value instead of the one that the test needed. Closes #93142
1 parent dfbe642 commit b15098a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

x-pack/plugin/autoscaling/src/test/java/org/elasticsearch/xpack/autoscaling/storage/ReactiveStorageDeciderDecisionTests.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ public void testStoragePreventsAllocation() {
191191
assertThat(state, sameInstance(lastState));
192192
}
193193

194-
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/93142")
195194
public void testStoragePreventsMove() {
196195
// this test moves shards to warm nodes and then checks that the reactive decider can calculate the storage necessary to move them
197196
// back to hot nodes.
@@ -270,7 +269,6 @@ public void testStoragePreventsMove() {
270269
verifyScale(addDataNodes(DATA_HOT_NODE_ROLE, "additional", state, hotNodes), 0, "storage ok", mockCanAllocateDiskDecider);
271270
}
272271

273-
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/93142")
274272
public void testMoveToEmpty() {
275273
// allocate all primary shards
276274
allocate();
@@ -474,14 +472,16 @@ private boolean hasStartedSubjectShard() {
474472
}
475473

476474
private static AllocationDeciders createAllocationDeciders(AllocationDecider... extraDeciders) {
477-
ClusterSettings clusterSettings = new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS);
478-
Collection<AllocationDecider> systemAllocationDeciders = ClusterModule.createAllocationDeciders(
475+
ClusterSettings clusterSettings = ClusterSettings.createBuiltInClusterSettings(
479476
Settings.builder()
480477
.put(
481478
ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_INITIAL_PRIMARIES_RECOVERIES_SETTING.getKey(),
482479
Integer.MAX_VALUE
483480
)
484-
.build(),
481+
.build()
482+
);
483+
Collection<AllocationDecider> systemAllocationDeciders = ClusterModule.createAllocationDeciders(
484+
Settings.EMPTY,
485485
clusterSettings,
486486
Collections.emptyList()
487487
);

0 commit comments

Comments
 (0)