[TEST] wait for pending tasks finished before testing cluster state collector
Original commit: elastic/x-pack-elasticsearch@d42c8c4bbe
This commit is contained in:
parent
6ca086b997
commit
4bf685cd31
|
@ -34,6 +34,9 @@ import static org.hamcrest.Matchers.notNullValue;
|
|||
public class ClusterStateCollectorTests extends AbstractCollectorTestCase {
|
||||
|
||||
public void testClusterStateCollectorNoIndices() throws Exception {
|
||||
// waits for pending tasks before collecing cluster state.
|
||||
// prevents the collector to read an older cluster state than the one used in assert later
|
||||
ensureGreen();
|
||||
assertMonitoringDocs(newClusterStateCollector().doCollect(), 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue