mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[Alerts] resolve flaky lastExecutionDate tests (#79436)
resolves https://github.com/elastic/kibana/issues/79249 The tests that were flaky were capturing a date while the test was running, and then comparing to a lastExecutionDate field. Most of the time this worked, but were sometimes out of order because of the way the searches are done and status changing dynamically. The only current dates we can test against are really at the very beginning and very end of the tests.
This commit is contained in:
parent
ad89e6f956
commit
a812db3e26
1 changed files with 1 additions and 5 deletions
|
@ -19,8 +19,7 @@ import { FtrProviderContext } from '../../../common/ftr_provider_context';
|
|||
export default function executionStatusAlertTests({ getService }: FtrProviderContext) {
|
||||
const supertest = getService('supertest');
|
||||
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/79249
|
||||
describe.skip('executionStatus', () => {
|
||||
describe('executionStatus', () => {
|
||||
const objectRemover = new ObjectRemover(supertest);
|
||||
|
||||
after(async () => await objectRemover.removeAll());
|
||||
|
@ -65,7 +64,6 @@ export default function executionStatusAlertTests({ getService }: FtrProviderCon
|
|||
expect(response.status).to.eql(200);
|
||||
const alertId = response.body.id;
|
||||
dates.push(response.body.executionStatus.lastExecutionDate);
|
||||
dates.push(Date.now());
|
||||
objectRemover.add(Spaces.space1.id, alertId, 'alert', 'alerts');
|
||||
|
||||
const executionStatus = await waitForStatus(alertId, new Set(['ok']));
|
||||
|
@ -100,7 +98,6 @@ export default function executionStatusAlertTests({ getService }: FtrProviderCon
|
|||
expect(response.status).to.eql(200);
|
||||
const alertId = response.body.id;
|
||||
dates.push(response.body.executionStatus.lastExecutionDate);
|
||||
dates.push(Date.now());
|
||||
objectRemover.add(Spaces.space1.id, alertId, 'alert', 'alerts');
|
||||
|
||||
const executionStatus = await waitForStatus(alertId, new Set(['active']));
|
||||
|
@ -132,7 +129,6 @@ export default function executionStatusAlertTests({ getService }: FtrProviderCon
|
|||
expect(response.status).to.eql(200);
|
||||
const alertId = response.body.id;
|
||||
dates.push(response.body.executionStatus.lastExecutionDate);
|
||||
dates.push(Date.now());
|
||||
objectRemover.add(Spaces.space1.id, alertId, 'alert', 'alerts');
|
||||
|
||||
const executionStatus = await waitForStatus(alertId, new Set(['error']));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue