Skip to content

Commit

Permalink
Fix failing data stream snapshot test (#69425)
Browse files Browse the repository at this point in the history
Backporting #69004 to 7.12 branch.

Co-authored-by: Dan Hermann <danhermann@users.noreply.github.com>
  • Loading branch information
martijnvg and danhermann committed Feb 23, 2021
1 parent 1be2ebf commit 72ae62e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,11 @@ public void testSnapshot() {

public void testSnapshotWithAllBackingIndicesRemoved() {
DataStream preSnapshotDataStream = DataStreamTestHelper.randomInstance();
List<Index> indicesToAdd = DataStreamTestHelper.randomIndexInstances();
List<Index> indicesToAdd = new ArrayList<>();
while (indicesToAdd.isEmpty()) {
// ensure at least one index
indicesToAdd.addAll(DataStreamTestHelper.randomIndexInstances());
}

DataStream postSnapshotDataStream = new DataStream(
preSnapshotDataStream.getName(),
Expand Down

0 comments on commit 72ae62e

Please sign in to comment.