Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { merge, omit, times, chunk, isEmpty } from 'lodash';
import { merge, omit, chunk, isEmpty } from 'lodash';
import uuid from 'uuid';
import expect from '@kbn/expect/expect.js';
import moment from 'moment';
Expand All @@ -19,9 +19,7 @@ export default function({ getService }: FtrProviderContext) {
const log = getService('log');
const retry = getService('retry');

// FLAKY: https://github.com/elastic/kibana/issues/64723
// FLAKY: https://github.com/elastic/kibana/issues/64812
describe.skip('Event Log public API', () => {
describe('Event Log public API', () => {
it('should allow querying for events by Saved Object', async () => {
const id = uuid.v4();

Expand All @@ -45,11 +43,7 @@ export default function({ getService }: FtrProviderContext) {
it('should support pagination for events', async () => {
const id = uuid.v4();

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)));
const expectedEvents = await logFakeEvents(id, 6);

await retry.try(async () => {
const {
Expand All @@ -59,10 +53,7 @@ export default function({ getService }: FtrProviderContext) {
expect(foundEvents.length).to.be(6);
});

const [expectedFirstPage, expectedSecondPage] = chunk(
[firstExpectedEvent, ...expectedEvents],
3
);
const [expectedFirstPage, expectedSecondPage] = chunk(expectedEvents, 3);

const {
body: { data: firstPage },
Expand Down