[Test] Ensure monitoring indices are yellow in LocalExporterTests
Before searching for documents in monitoring indices, we need to ensure
that they exist and are available.
Original commit: elastic/x-pack-elasticsearch@29db55a1fe70b8e56297893ec363a3817c544e98
@@ -195,6 +195,9 @@ public class LocalExporterTests extends MonitoringIntegTestCase {
assertEquals(RestStatus.OK, bulk.get().status());
refresh();
+ assertThat(client().admin().indices().prepareExists(".monitoring-*").get().isExists(), is(true));
+ ensureYellow(".monitoring-*");
+
SearchResponse response = client().prepareSearch(".monitoring-*").get();
assertEquals(nbDocs, response.getHits().getTotalHits());
});
