[Index management] Clean all tests after execution and navigate directly to the tab#232198
Conversation
|
Pinging @elastic/kibana-management (Team:Kibana Management) |
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#9177[✅] x-pack/platform/test/functional/apps/index_management/config.ts: 100/100 tests passed. |
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#9182[✅] x-pack/platform/test/serverless/functional/configs/search/config.group1.ts: 100/100 tests passed. |
ElenaStoeva
left a comment
There was a problem hiding this comment.
Great job @SoniaSanzV - it's nice to see the test running time reduction! Changes lgtm with one suggestion for an improvement.
| } catch (e) { | ||
| log.debug('[Teardown error] Error deleting test policy'); | ||
| throw e; | ||
| log.debug(`[Teardown error] Error deleting test index: ${e.message}`); |
There was a problem hiding this comment.
We could separate these into two try-catch blocks so that if one fails the other resource is still deleted, and the log message would be more helpful (i.e. right now, if the policy deletion failed, the logs will say that the index deletion failed).
| } catch (e) { | ||
| log.debug('[Teardown error] Error deleting test policy'); | ||
| throw e; | ||
| log.debug(`[Teardown error] Error deleting test policy: ${e.message}`); |
| } catch (e) { | ||
| log.debug('[Teardown error] Error deleting test policy'); | ||
| throw e; | ||
| log.debug(`[Teardown error] Error deleting test index: ${e.message}`); |
| } catch (e) { | ||
| log.debug('[Teardown error] Error deleting test policy'); | ||
| throw e; | ||
| log.debug(`[Teardown error] Error deleting test index: ${e.message}`); |
Thank you for the review! I've addressed your suggestions in my last commit! |
💚 Build Succeeded
Metrics [docs]Async chunks
History
cc @SoniaSanzV |
ElenaStoeva
left a comment
There was a problem hiding this comment.
Lgtm, thanks for the last changes!
|
Starting backport for target branches: 8.18, 8.19, 9.0, 9.1 https://github.com/elastic/kibana/actions/runs/17319957952 |
…tly to the tab (elastic#232198) ## Summary Space time project. I'm trying to improve the test for Kibana Management. In this PR, I did two things: * Clean up all created resources after execution. This suite contained a lot of resources that wasn't deleted after execution. That complicates local testing and leads to failures if you re-run the tests. * Navigates directly to the desired tab when setting up the tests. This is not an anti-patter, but it was time consuming. We were doing this: ``` await pageObjects.common.navigateToApp('indexManagement'); // Navigate to the data streams tab await pageObjects.indexManagement.changeTabs('data_streamsTab'); await pageObjects.header.waitUntilLoadingHasFinished(); ``` But the `navigateToApp` method already contains a path parameter, so doing it this way, we can get rid of unnecessaries `waitUntilLoadingHasFinished` calls. With this simple change, the execution time of serverless tests locally dropped from 2 minutes to 1 minute. * Also, changes the data-test-subj for creating a component template from `createPipelineButton` to `createComponentTemplateButton`, that wasn't reflecting what the button really does. Flay test runner stateful tests: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/9177 Flay test runner serverless tests: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/9182 (cherry picked from commit 1abc780)
…tly to the tab (elastic#232198) ## Summary Space time project. I'm trying to improve the test for Kibana Management. In this PR, I did two things: * Clean up all created resources after execution. This suite contained a lot of resources that wasn't deleted after execution. That complicates local testing and leads to failures if you re-run the tests. * Navigates directly to the desired tab when setting up the tests. This is not an anti-patter, but it was time consuming. We were doing this: ``` await pageObjects.common.navigateToApp('indexManagement'); // Navigate to the data streams tab await pageObjects.indexManagement.changeTabs('data_streamsTab'); await pageObjects.header.waitUntilLoadingHasFinished(); ``` But the `navigateToApp` method already contains a path parameter, so doing it this way, we can get rid of unnecessaries `waitUntilLoadingHasFinished` calls. With this simple change, the execution time of serverless tests locally dropped from 2 minutes to 1 minute. * Also, changes the data-test-subj for creating a component template from `createPipelineButton` to `createComponentTemplateButton`, that wasn't reflecting what the button really does. Flay test runner stateful tests: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/9177 Flay test runner serverless tests: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/9182 (cherry picked from commit 1abc780)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
12 similar comments
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
4 similar comments
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
4 similar comments
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Summary
Space time project. I'm trying to improve the test for Kibana Management. In this PR, I did two things:
But the
navigateToAppmethod already contains a path parameter, so doing it this way, we can get rid of unnecessarieswaitUntilLoadingHasFinishedcalls.With this simple change, the execution time of serverless tests locally dropped from 2 minutes to 1 minute.
createPipelineButtontocreateComponentTemplateButton, that wasn't reflecting what the button really does.Flay test runner stateful tests: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/9177
Flay test runner serverless tests: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/9182