[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@29db55a1fe
This commit is contained in:
parent
85deb1f8f7
commit
f3b3df0911
|
@ -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());
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue