Skip to content

Commit 172f85f

Browse files
committed
fixed same flaky problem in additional test
1 parent ced64f4 commit 172f85f

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

x-pack/test/plugin_api_integration/test_suites/event_log/public_api_integration.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,7 @@ export default function({ getService }: FtrProviderContext) {
4545
it('should support pagination for events', async () => {
4646
const id = uuid.v4();
4747

48-
const [firstExpectedEvent, ...expectedEvents] = times(6, () => fakeEvent(id));
49-
50-
// run one first to create the SO and avoid clashes
51-
await logTestEvent(id, firstExpectedEvent);
52-
await Promise.all(expectedEvents.map(event => logTestEvent(id, event)));
48+
const expectedEvents = await logFakeEvents(id, 6);
5349

5450
await retry.try(async () => {
5551
const {
@@ -59,10 +55,7 @@ export default function({ getService }: FtrProviderContext) {
5955
expect(foundEvents.length).to.be(6);
6056
});
6157

62-
const [expectedFirstPage, expectedSecondPage] = chunk(
63-
[firstExpectedEvent, ...expectedEvents],
64-
3
65-
);
58+
const [expectedFirstPage, expectedSecondPage] = chunk(expectedEvents, 3);
6659

6760
const {
6861
body: { data: firstPage },

0 commit comments

Comments
 (0)