Skip to content

Commit

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

It fixes elastic#165619
## Notes:
- The issue wasn't related to the `/_alertSummary` endpoint and wouldn't
be fixed after merging the new update from ResponsOps PR. (tested here
with a clone PR elastic#166273)
- The failing test is so little flaky only **0.5%** , after each update
I run the flaky-test-runner to run 400 times.
- The issue seems related to three things that has been done:
   - Waiting for the rule details page to load
   - Use LogThreshold instead of the Uptime rule
- The mocking lib seems to miss the mock sometimes with Uptime and makes
the real function be called without a `featureIds`

## DoD
- The PR has been tested 2 x 400 = 800 times with 0 fails ->
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3100
  • Loading branch information
fkanout authored Sep 14, 2023
1 parent 6ab7ec4 commit 5106852
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ export default ({ getService }: FtrProviderContext) => {
return true;
}

// FLAKY: https://github.com/elastic/kibana/issues/165619
describe.skip('Observability Rule Details page', function () {
describe('Observability Rule Details page', function () {
this.tags('includeFirefox');

let uptimeRuleId: string;
Expand Down Expand Up @@ -149,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 5106852

Please sign in to comment.