test: ensure the bulk has been opened before trying to export
The LocalExporter tests seem to fail regularly in CI. It appears as though there is a race condition where the LocalExporter has not truly been started yet and the tests try to send a collected document through the exporter. The documents being indexed by the test are never indexed and are dropped. The tests now wait for the exporter to be started. Relates to elastic/elasticsearch#847 Original commit: elastic/x-pack-elasticsearch@b391067cae
This commit is contained in:
parent
203e6f4c6e
commit
b9b914408e
|
@ -288,6 +288,12 @@ public class LocalExporterTests extends MarvelIntegTestCase {
|
|||
final Exporter exporter = internalCluster().getInstance(Exporters.class).getExporter(name);
|
||||
assertThat(exporter, notNullValue());
|
||||
assertThat(exporter, instanceOf(LocalExporter.class));
|
||||
assertBusy(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
assertThat(exporter.openBulk(), notNullValue());
|
||||
}
|
||||
});
|
||||
return (LocalExporter) exporter;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue