Skip to content

Commit

Permalink
[8.10] [AO] Fix flaky test (#166179) (#166479)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.10`:
- [[AO] Fix flaky test
(#166179)](#166179)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Faisal
Kanout","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-09-14T15:33:58Z","message":"[AO]
Fix flaky test (#166179)\n\n## Summary\r\n\r\nIt fixes
https://github.com/elastic/kibana/issues/165619\r\n## Notes:\r\n- The
issue wasn't related to the `/_alertSummary` endpoint and wouldn't\r\nbe
fixed after merging the new update from ResponsOps PR. (tested
here\r\nwith a clone PR
https://github.com/elastic/kibana/pull/166273)\r\n- The failing test is
so little flaky only **0.5%** , after each update\r\nI run the
flaky-test-runner to run 400 times.\r\n- The issue seems related to
three things that has been done:\r\n - Waiting for the rule details page
to load\r\n - Use LogThreshold instead of the Uptime rule\r\n- The
mocking lib seems to miss the mock sometimes with Uptime and
makes\r\nthe real function be called without a `featureIds`\r\n\r\n##
DoD\r\n- The PR has been tested 2 x 400 = 800 times with 0 fails
->\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3100","sha":"51068521b8e85eb756ec1f5d37b3e677127055fb","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:
Actionable
Observability","backport:prev-minor","v8.10.0","v8.11.0"],"number":166179,"url":"https://github.com/elastic/kibana/pull/166179","mergeCommit":{"message":"[AO]
Fix flaky test (#166179)\n\n## Summary\r\n\r\nIt fixes
https://github.com/elastic/kibana/issues/165619\r\n## Notes:\r\n- The
issue wasn't related to the `/_alertSummary` endpoint and wouldn't\r\nbe
fixed after merging the new update from ResponsOps PR. (tested
here\r\nwith a clone PR
https://github.com/elastic/kibana/pull/166273)\r\n- The failing test is
so little flaky only **0.5%** , after each update\r\nI run the
flaky-test-runner to run 400 times.\r\n- The issue seems related to
three things that has been done:\r\n - Waiting for the rule details page
to load\r\n - Use LogThreshold instead of the Uptime rule\r\n- The
mocking lib seems to miss the mock sometimes with Uptime and
makes\r\nthe real function be called without a `featureIds`\r\n\r\n##
DoD\r\n- The PR has been tested 2 x 400 = 800 times with 0 fails
->\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3100","sha":"51068521b8e85eb756ec1f5d37b3e677127055fb"}},"sourceBranch":"main","suggestedTargetBranches":["8.10"],"targetPullRequestStates":[{"branch":"8.10","label":"v8.10.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/166179","number":166179,"mergeCommit":{"message":"[AO]
Fix flaky test (#166179)\n\n## Summary\r\n\r\nIt fixes
https://github.com/elastic/kibana/issues/165619\r\n## Notes:\r\n- The
issue wasn't related to the `/_alertSummary` endpoint and wouldn't\r\nbe
fixed after merging the new update from ResponsOps PR. (tested
here\r\nwith a clone PR
https://github.com/elastic/kibana/pull/166273)\r\n- The failing test is
so little flaky only **0.5%** , after each update\r\nI run the
flaky-test-runner to run 400 times.\r\n- The issue seems related to
three things that has been done:\r\n - Waiting for the rule details page
to load\r\n - Use LogThreshold instead of the Uptime rule\r\n- The
mocking lib seems to miss the mock sometimes with Uptime and
makes\r\nthe real function be called without a `featureIds`\r\n\r\n##
DoD\r\n- The PR has been tested 2 x 400 = 800 times with 0 fails
->\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3100","sha":"51068521b8e85eb756ec1f5d37b3e677127055fb"}}]}]
BACKPORT-->

Co-authored-by: Faisal Kanout <[email protected]>
  • Loading branch information
kibanamachine and fkanout authored Sep 14, 2023
1 parent 865d7fc commit 6cc42f1
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,14 @@ export default ({ getService }: FtrProviderContext) => {

describe('Alert summary widget component', () => {
before(async () => {
await observability.alerts.common.navigateToRuleDetailsByRuleId(uptimeRuleId);
await observability.alerts.common.navigateToRuleDetailsByRuleId(logThresholdRuleId);
await retry.waitFor(
'Rule details to be visible',
async () => await testSubjects.exists('ruleDetails')
);
});

it('shows component on the rule detils page', async () => {
it('shows component on the rule details page', async () => {
await observability.components.alertSummaryWidget.getCompactComponentSelectorOrFail();

const timeRangeTitle =
Expand Down

0 comments on commit 6cc42f1

Please sign in to comment.