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/group2/tests/telemetry/alerting_and_actions_telemetry·ts - alerting api integration security and spaces enabled - Group 2 Alerting and Actions Telemetry telemetry should retrieve telemetry data in the expected format (#172701)

## Summary

Test was failing because a `avg_execution_time > 0` check in the
telemetry was returning `false` instead of `true`. I added a short delay
to the connector executor to increase the execution time duration
slightly to try to avoid this.

Ran 450x in the flaky test runner:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4256

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
ymao1 and kibanamachine committed Dec 7, 2023
1 parent 835d4af commit ef87bce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ export function defineActionTypes(
params: { schema: schema.object({}, { defaultValue: {} }) },
},
async executor() {
// add a delay so the execution time is non-zero
await new Promise((r) => setTimeout(r, 1000));
throw new Error('this action is intended to fail');
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ export default function createAlertingAndActionsTelemetryTests({ getService }: F
const esTestIndexTool = new ESTestIndexTool(es, retry);
const supertestWithoutAuth = getService('supertestWithoutAuth');

// FLAKY: https://github.com/elastic/kibana/issues/140973
describe.skip('telemetry', () => {
describe('test telemetry', () => {
const objectRemover = new ObjectRemover(supertest);
const alwaysFiringRuleId: { [key: string]: string } = {};

Expand Down

0 comments on commit ef87bce

Please sign in to comment.