Skip to content

Commit

Permalink
ensur eevent log test is less flaky
Browse files Browse the repository at this point in the history
  • Loading branch information
gmmorris committed Apr 29, 2020
1 parent a38c11c commit 0af086c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ export default function({ getService }: FtrProviderContext) {
const [firstExpectedEvent, ...expectedEvents] = times(6, () => fakeEvent(id));
// run one first to create the SO and avoid clashes
await logTestEvent(id, firstExpectedEvent);
await Promise.all(expectedEvents.map(event => logTestEvent(id, event)));
// stagger the API calls to ensure the creation order is as expected
for (let index = 0; index < expectedEvents.length; index++) {
await logTestEvent(id, expectedEvents[index]);
}

await retry.try(async () => {
const {
Expand Down

0 comments on commit 0af086c

Please sign in to comment.