Skip to content

Commit

Permalink
[ResponseOps][Alerting] Flaky test x-pack/plugins/event_log/server/es (
Browse files Browse the repository at this point in the history
…elastic#162558)

elastic#156061

## Summary

Fixes flaky test by adding ceil(). When it fails the time elapsed is
close to the `MOCK_RETRY_DELAY` of 20 (like 19.7), so rounding up helps
with the flakiness
  • Loading branch information
doakalexi authored and Devon Thomson committed Aug 1, 2023
1 parent 20d2fe7 commit b966dde
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions x-pack/plugins/event_log/server/es/init.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,7 @@ describe('parseIndexAliases', () => {
});
});

// FLAKY: https://github.com/elastic/kibana/issues/156061
describe.skip('retries', () => {
describe('retries', () => {
let esContext = contextMock.create();
// set up context APIs to return defaults indicating already created
beforeEach(() => {
Expand All @@ -474,7 +473,7 @@ describe.skip('retries', () => {

const timeStart = performance.now();
await initializeEs(esContext);
const timeElapsed = performance.now() - timeStart;
const timeElapsed = Math.ceil(performance.now() - timeStart);

expect(timeElapsed).toBeGreaterThanOrEqual(MOCK_RETRY_DELAY);

Expand Down

0 comments on commit b966dde

Please sign in to comment.