From 4be03e9bebdbb52379e3e227e82e396327898d5b Mon Sep 17 00:00:00 2001 From: Niels Bauman <33722607+nielsbauman@users.noreply.github.com> Date: Tue, 14 May 2024 17:28:36 +0200 Subject: [PATCH] Fix DataStream mutation in test (#108622) Fixes #108620 --- .../org/elasticsearch/cluster/metadata/DataStreamTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/test/java/org/elasticsearch/cluster/metadata/DataStreamTests.java b/server/src/test/java/org/elasticsearch/cluster/metadata/DataStreamTests.java index 87fe732d156c..5a5d5f46de41 100644 --- a/server/src/test/java/org/elasticsearch/cluster/metadata/DataStreamTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/metadata/DataStreamTests.java @@ -145,7 +145,7 @@ protected DataStream mutateInstance(DataStream instance) { if (randomBoolean() || autoShardingEvent == null) { // If we're mutating the auto sharding event of the failure store, we need to ensure there's at least one failure index. if (failureIndices.isEmpty()) { - failureIndices = DataStreamTestHelper.randomIndexInstances(); + failureIndices = DataStreamTestHelper.randomNonEmptyIndexInstances(); failureStore = true; } autoShardingEvent = new DataStreamAutoShardingEvent(