From 9163c9ce3616b1e11a1b71899fef3784b667e645 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Thu, 6 Aug 2020 11:57:12 +0200 Subject: [PATCH] Adjust hlrc data streams integration test (#60804) Backport of #60746 to wait for at least a single shard to be allocated for a backing index of a data stream, so that total store size is larger than zero (which is what the tests expects). Closes #60461 --- .../test/java/org/elasticsearch/client/IndicesClientIT.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/IndicesClientIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/IndicesClientIT.java index 20ada0b96b7..0d2e7df9c88 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/IndicesClientIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/IndicesClientIT.java @@ -2051,6 +2051,9 @@ public class IndicesClientIT extends ESRestHighLevelClientTestCase { IndicesClient indices = highLevelClient().indices(); response = execute(createDataStreamRequest, indices::createDataStream, indices::createDataStreamAsync); assertThat(response.isAcknowledged(), equalTo(true)); + ensureHealth(dataStreamName, (request -> { + request.addParameter("wait_for_status", "yellow"); + })); GetDataStreamRequest getDataStreamRequest = new GetDataStreamRequest(dataStreamName); GetDataStreamResponse getDataStreamResponse = execute(getDataStreamRequest, indices::getDataStream, indices::getDataStreamAsync);