[ResponseOps][Alerting] Flaky test x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/telemetry/index·ts#161096
Conversation
|
Pinging @elastic/response-ops (Team:ResponseOps) |
pmuellr
left a comment
There was a problem hiding this comment.
Generally LGTM. I'd like to get the equal -> gte change in the getEventLog() call - that feels like it could someday go flaky.
The others I'm not so sure about. Mainly because I'm missing some context. Could you provide some comments in the PR for:
- why the originating issues were flaky
- why they aren't flaky anymore
- it seems like we removed some rules being tested - I'm curious why
| // number of rule executions - just checking for non-zero as we can't set an exact number | ||
| // each rule should have had a chance to execute once | ||
| expect(telemetry.count_rules_executions_per_day >= 21).to.be(true); | ||
| expect(telemetry.count_rules_executions_per_day >= 0).to.be(true); |
There was a problem hiding this comment.
Unfortunate to have to leave that at potentially zero! Looking at the code, I think we'd have to call getEventLog() on every rule, to make sure it has at least one execute, before requesting the telemetry. Then we could use the number of rules instead of zero.
There was a problem hiding this comment.
I can look into this too and see if I can use the number of rules!
There was a problem hiding this comment.
Changing this to non 0 caused the test to be flaky again, I'd like to just leave leave it as > 0
The original test was flaky from this block of code for both actions and alerting telemetry The number of
I simplified the test, added the object remover, and updated the code block above to remove the flaky parts I mentioned.
I removed some rules to help clean up the test, I thought it was a hard to understand and some of the rules seemed to be verifying redundant things. I only kept the minimal amount of rules I needed to verify the telemetry results. |
…to flaky-test/telemetry
…to flaky-test/telemetry
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
pmuellr
left a comment
There was a problem hiding this comment.
LGTM, thanks for changes (and attempts at changes!)
…on/security_and_spaces/group2/tests/telemetry/index·ts (elastic#161096) Resolves elastic#140973 Resolves elastic#136153 ## Summary Fixes a telemetry bug and a flaky telemetry test ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2717 x 250 https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2718 x 250
Resolves #140973
Resolves #136153
Summary
Fixes a telemetry bug and a flaky telemetry test
Checklist
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2717 x 250
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2718 x 250