Commit graph

2 commits

Author SHA1 Message Date
Dzmitry Lemechko
8436f45fd1
FTR: enable ESLint mocha rules for api integration tests (#191267)
## Summary

Follow-up to #190690

Most of API integration tests does not match the path pattern set in the
original PR (thanks @pheyos for catching it) and where not updated.
This PR updates `.eslintrc.js` with explicit patterns to lint
api_integration tests. Hopefully it is final change, but I rely on code
owners to double check it.

Most of the changes are trivial adjustments:
- duplicated before/after hooks `mocha/no-sibling-hooks`
- duplicated test titles `mocha/no-identical-title`
- async function in describe() `mocha/no-async-describe`

---------

Co-authored-by: Ash <1849116+ashokaditya@users.noreply.github.com>
2024-08-30 18:50:35 +02:00
Maryam Saeidi
57522d601c
Improve logging in API integration test and replace pRetry with a method from retryService (#178515)
Related to #176401, #175776

## Summary

This PR:

- Improves logging (I've added debug logs to the helpers that does an
API request such as creating a data view)
- Uses retryService instead of pRetry
- In case of throwing an error in pRetry, when we have 10 retries, it
does not log the retry attempts and we end up in the situation that is
mentioned in this [comment, item
3](https://github.com/elastic/kibana/issues/176401#issuecomment-1980730275)
    
|Before|After|
|---|---|

|![image](0a0897a3-0bd3-4d44-9b79-8f99fb580b4a)|
- Attempts to fix flakiness in rate reason message due to having
different data

![image](dff48ac1-a9bf-4b93-addb-fd40acae382e)


### Flaky test runner
#### Current (after adding refresh index and adjusting timeout)
- [25]
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5463

- [200]
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5465


#### Old
- [25]
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5452

- [200]
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5454
[1 Failed : 25 Canceled: 174 Passed ]
  ##### After checking data is generated in metric threshold
- [25]
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5460

- [200]
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5462
[1 Failed : 199 Canceled ]

Inspired by https://github.com/elastic/kibana/pull/173998, special
thanks to @jpdjere and @dmlemeshko for their support and knowledge
sharing.
2024-03-19 05:41:41 -07:00