diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/builtin_alert_types/cancellable/rule.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/builtin_alert_types/cancellable/rule.ts index 8a254447b4a4e..3cc6137f352dc 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/builtin_alert_types/cancellable/rule.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/builtin_alert_types/cancellable/rule.ts @@ -146,7 +146,7 @@ export default function ruleTests({ getService }: FtrProviderContext) { `test.cancellableRule:${ruleId}: execution cancelled due to timeout - exceeded rule type timeout of 3s`, ].includes(rule.execution_status.error.message) ).to.eql(true); - expect(rule.execution_status.error.reason).to.eql('timeout'); + expect(['timeout', 'execute'].includes(rule.execution_status.error.reason)).to.eql(true); }); it('throws an error if execution is short circuited', async () => { @@ -195,7 +195,7 @@ export default function ruleTests({ getService }: FtrProviderContext) { `test.cancellableRule:${ruleId}: execution cancelled due to timeout - exceeded rule type timeout of 3s`, ].includes(rule.execution_status.error.message) ).to.eql(true); - expect(rule.execution_status.error.reason).to.eql('timeout'); + expect(['timeout', 'execute'].includes(rule.execution_status.error.reason)).to.eql(true); }); interface CreateRuleParams { diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/builtin_alert_types/long_running/rule.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/builtin_alert_types/long_running/rule.ts index effd35d392a3f..7ea429f1be92f 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/builtin_alert_types/long_running/rule.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/builtin_alert_types/long_running/rule.ts @@ -80,7 +80,7 @@ export default function ruleTests({ getService }: FtrProviderContext) { `test.patternLongRunning.cancelAlertsOnRuleTimeout:${ruleId}: execution cancelled due to timeout - exceeded rule type timeout of 3s`, ].includes(lastErrorStatus?.error.message || '') ).to.eql(true); - expect(lastErrorStatus?.error.reason).to.eql('timeout'); + expect(['timeout', 'execute'].includes(lastErrorStatus?.error.reason || '')).to.eql(true); }); it('writes event log document for timeout for each rule execution that ends in timeout - some executions times out', async () => {