test: force elasticsearch to index batch data (#11153)

This commit is contained in:
Joshua Powers 2022-05-19 14:15:41 -06:00 committed by GitHub
parent deb0c6e207
commit 78d92622da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -568,8 +568,13 @@ func setupIntegrationTest() error {
return err
}
// wait 5s (default) for Elasticsearch to index, so results are consistent
time.Sleep(time.Second * 5)
// force elastic to refresh indexes to get new batch data
ctx := context.Background()
_, err = e.esClient.Refresh().Do(ctx)
if err != nil {
return err
}
return nil
}