Skip to content

Commit

Permalink
Fixes Failing test: X-Pack Alerting API Integration Tests.x-pack/test…
Browse files Browse the repository at this point in the history
…/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/task_runner·ts - alerting api integration security and spaces enabled Alerts - Group 1 alerts backfill rule runs ad hoc backfill task should run all execution sets of a scheduled backfill and correctly generate alerts (elastic#191761)

Resolves elastic#183350

## Summary

* Updated rule param that was causing a partial failure in the rule
execution due to maxSignals being greater than the configured allowed
max alerts
* Updated tests to clean the alerts index after every test.

After making these changes, was able to run the flaky test runner 4x200
times without failure.

---------

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
ymao1 and elasticmachine authored Sep 4, 2024
1 parent a392bb2 commit 772655a
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,22 +86,19 @@ export default function createBackfillTaskRunnerTests({ getService }: FtrProvide
moment().utc().startOf('day').subtract(9, 'days').add(667, 'seconds').toISOString(),
];

// FLAKY: https://github.com/elastic/kibana/issues/183350
describe.skip('ad hoc backfill task', () => {
describe('ad hoc backfill task', () => {
beforeEach(async () => {
await esTestIndexTool.destroy();
await esTestIndexTool.setup();
});
afterEach(async () => {
await objectRemover.removeAll();
await esTestIndexTool.destroy();
});
after(async () => {
await es.deleteByQuery({
index: alertsAsDataIndex,
query: { match_all: {} },
conflicts: 'proceed',
});
await objectRemover.removeAll();
await esTestIndexTool.destroy();
});

// This test
Expand Down Expand Up @@ -143,7 +140,7 @@ export default function createBackfillTaskRunnerTests({ getService }: FtrProvide
from: '1m',
kibana_siem_app_url: 'https://localhost:5601/app/security',
},
maxSignals: 100,
maxSignals: 20,
riskScore: 21,
riskScoreMapping: [],
severity: 'low',
Expand Down

0 comments on commit 772655a

Please sign in to comment.