Fix flaky getSummarizedAlerts unit tests (#165801)

Resolves: #165755, #163192, #165754, #165753, #165752, #165751, #165750,
#165749, #165748, #163194, #163193, #163192

This PR fixes above flaky tests by fixing the `kibana.alert.start`
filter in getExpectedQueryByTimeRange fixture
This commit is contained in:
Ersin Erdal 2023-09-06 13:34:19 +02:00 committed by GitHub
parent 14876726f4
commit ba5a049675
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions

View file

@ -1363,10 +1363,6 @@ describe('Alerts Client', () => {
});
});
// FLAKY: https://github.com/elastic/kibana/issues/163192
// FLAKY: https://github.com/elastic/kibana/issues/163193
// FLAKY: https://github.com/elastic/kibana/issues/163194
// FLAKY: https://github.com/elastic/kibana/issues/163195
describe('getSummarizedAlerts', () => {
beforeEach(() => {
clusterClient.search.mockReturnValue({

View file

@ -72,8 +72,8 @@ export const getParamsByTimeQuery: GetSummarizedAlertsParams = {
ruleId: 'ruleId',
spaceId: 'default',
excludedAlertInstanceIds: [],
end: new Date(),
start: new Date(),
end: new Date('2023-09-06T00:01:00.000'),
start: new Date('2023-09-06T00:00:00.000'),
};
export const getExpectedQueryByExecutionUuid = ({
@ -258,7 +258,7 @@ export const getExpectedQueryByTimeRange = ({
{
range: {
'kibana.alert.start': {
lt: end,
lt: start,
},
},
},