[Unified Data Table] Improve failing test speed#243168
Merged
Merged
Conversation
Contributor
💚 Build Succeeded
Metrics [docs]Async chunks
History
cc @AlexGPlay |
Contributor
|
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
PhilippeOberti
approved these changes
Nov 17, 2025
Contributor
PhilippeOberti
left a comment
There was a problem hiding this comment.
Code review only, thanks for making tests run faster. LGTM for the @elastic/security-threat-hunting-investigations team
davismcphee
approved these changes
Nov 18, 2025
Contributor
davismcphee
left a comment
There was a problem hiding this comment.
Awesome, thanks! Let's see how it goes 🤞
eokoneyo
pushed a commit
to eokoneyo/kibana
that referenced
this pull request
Dec 2, 2025
## Summary Closes elastic#234829 Closes elastic#240905 Closes elastic#240904 All 3 tests were timing out so lets try to improve how fast they run - for this this PR changes from `get/queryByRole` to `get/queryByTestId` as it speeds up the tests significantly. Times measured isolating the tests using `it.only` and using the mean time of 10 runs + mean time of 10 runs of the whole file. > [!NOTE] > Both scripts to measure the test times were generated by ChatGPT Individual tests where measured with this script + `it.only`: [run-tests.sh](https://github.com/user-attachments/files/23580522/run-tests.sh) The whole test file was measured using this script: [all-tests.sh](https://github.com/user-attachments/files/23580737/all-tests.sh) | Test | Before | After | |--|--------|------| | should show the reset width button only for absolute width columns, and allow resetting to default width | 1268ms | 637ms | | should not reset the last column to auto width when there are remaining auto width columns | 894ms | 346ms | | should reset the last column to auto width if only absolute width columns remain | 893ms | 359ms | | All tests | 21.069s | 17.338s | ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [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
Contributor
|
Starting backport for target branches: 9.2 |
Contributor
|
Starting backport for target branches: 9.2 |
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Dec 4, 2025
## Summary Closes elastic#234829 Closes elastic#240905 Closes elastic#240904 All 3 tests were timing out so lets try to improve how fast they run - for this this PR changes from `get/queryByRole` to `get/queryByTestId` as it speeds up the tests significantly. Times measured isolating the tests using `it.only` and using the mean time of 10 runs + mean time of 10 runs of the whole file. > [!NOTE] > Both scripts to measure the test times were generated by ChatGPT Individual tests where measured with this script + `it.only`: [run-tests.sh](https://github.com/user-attachments/files/23580522/run-tests.sh) The whole test file was measured using this script: [all-tests.sh](https://github.com/user-attachments/files/23580737/all-tests.sh) | Test | Before | After | |--|--------|------| | should show the reset width button only for absolute width columns, and allow resetting to default width | 1268ms | 637ms | | should not reset the last column to auto width when there are remaining auto width columns | 894ms | 346ms | | should reset the last column to auto width if only absolute width columns remain | 893ms | 359ms | | All tests | 21.069s | 17.338s | ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [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 (cherry picked from commit 94c5602)
Contributor
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Dec 4, 2025
## Summary Closes elastic#234829 Closes elastic#240905 Closes elastic#240904 All 3 tests were timing out so lets try to improve how fast they run - for this this PR changes from `get/queryByRole` to `get/queryByTestId` as it speeds up the tests significantly. Times measured isolating the tests using `it.only` and using the mean time of 10 runs + mean time of 10 runs of the whole file. > [!NOTE] > Both scripts to measure the test times were generated by ChatGPT Individual tests where measured with this script + `it.only`: [run-tests.sh](https://github.com/user-attachments/files/23580522/run-tests.sh) The whole test file was measured using this script: [all-tests.sh](https://github.com/user-attachments/files/23580737/all-tests.sh) | Test | Before | After | |--|--------|------| | should show the reset width button only for absolute width columns, and allow resetting to default width | 1268ms | 637ms | | should not reset the last column to auto width when there are remaining auto width columns | 894ms | 346ms | | should reset the last column to auto width if only absolute width columns remain | 893ms | 359ms | | All tests | 21.069s | 17.338s | ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [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 (cherry picked from commit 94c5602)
Contributor
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
kibanamachine
added a commit
that referenced
this pull request
Dec 4, 2025
) # Backport This will backport the following commits from `main` to `9.2`: - [[Unified Data Table] Improve failing test speed (#243168)](#243168) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Alejandro García Parrondo","email":"31973472+AlexGPlay@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-11-18T07:17:33Z","message":"[Unified Data Table] Improve failing test speed (#243168)\n\n## Summary\n\nCloses https://github.com/elastic/kibana/issues/234829\nCloses https://github.com/elastic/kibana/issues/240905\nCloses https://github.com/elastic/kibana/issues/240904\n\nAll 3 tests were timing out so lets try to improve how fast they run -\nfor this this PR changes from `get/queryByRole` to `get/queryByTestId`\nas it speeds up the tests significantly.\n\nTimes measured isolating the tests using `it.only` and using the mean\ntime of 10 runs + mean time of 10 runs of the whole file.\n\n> [!NOTE]\n> Both scripts to measure the test times were generated by ChatGPT\n\nIndividual tests where measured with this script + `it.only`:\n[run-tests.sh](https://github.com/user-attachments/files/23580522/run-tests.sh)\nThe whole test file was measured using this script:\n[all-tests.sh](https://github.com/user-attachments/files/23580737/all-tests.sh)\n\n| Test | Before | After |\n|--|--------|------|\n| should show the reset width button only for absolute width columns,\nand allow resetting to default width | 1268ms | 637ms |\n| should not reset the last column to auto width when there are\nremaining auto width columns | 894ms | 346ms |\n| should reset the last column to auto width if only absolute width\ncolumns remain | 893ms | 359ms |\n| All tests | 21.069s | 17.338s |\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"94c56027a853d2517c8b475b78814dd5c72c811d","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:DataDiscovery","backport:version","v9.2.0","v9.3.0"],"title":"[Unified Data Table] Improve failing test speed","number":243168,"url":"https://github.com/elastic/kibana/pull/243168","mergeCommit":{"message":"[Unified Data Table] Improve failing test speed (#243168)\n\n## Summary\n\nCloses https://github.com/elastic/kibana/issues/234829\nCloses https://github.com/elastic/kibana/issues/240905\nCloses https://github.com/elastic/kibana/issues/240904\n\nAll 3 tests were timing out so lets try to improve how fast they run -\nfor this this PR changes from `get/queryByRole` to `get/queryByTestId`\nas it speeds up the tests significantly.\n\nTimes measured isolating the tests using `it.only` and using the mean\ntime of 10 runs + mean time of 10 runs of the whole file.\n\n> [!NOTE]\n> Both scripts to measure the test times were generated by ChatGPT\n\nIndividual tests where measured with this script + `it.only`:\n[run-tests.sh](https://github.com/user-attachments/files/23580522/run-tests.sh)\nThe whole test file was measured using this script:\n[all-tests.sh](https://github.com/user-attachments/files/23580737/all-tests.sh)\n\n| Test | Before | After |\n|--|--------|------|\n| should show the reset width button only for absolute width columns,\nand allow resetting to default width | 1268ms | 637ms |\n| should not reset the last column to auto width when there are\nremaining auto width columns | 894ms | 346ms |\n| should reset the last column to auto width if only absolute width\ncolumns remain | 893ms | 359ms |\n| All tests | 21.069s | 17.338s |\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"94c56027a853d2517c8b475b78814dd5c72c811d"}},"sourceBranch":"main","suggestedTargetBranches":["9.2"],"targetPullRequestStates":[{"branch":"9.2","label":"v9.2.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/243168","number":243168,"mergeCommit":{"message":"[Unified Data Table] Improve failing test speed (#243168)\n\n## Summary\n\nCloses https://github.com/elastic/kibana/issues/234829\nCloses https://github.com/elastic/kibana/issues/240905\nCloses https://github.com/elastic/kibana/issues/240904\n\nAll 3 tests were timing out so lets try to improve how fast they run -\nfor this this PR changes from `get/queryByRole` to `get/queryByTestId`\nas it speeds up the tests significantly.\n\nTimes measured isolating the tests using `it.only` and using the mean\ntime of 10 runs + mean time of 10 runs of the whole file.\n\n> [!NOTE]\n> Both scripts to measure the test times were generated by ChatGPT\n\nIndividual tests where measured with this script + `it.only`:\n[run-tests.sh](https://github.com/user-attachments/files/23580522/run-tests.sh)\nThe whole test file was measured using this script:\n[all-tests.sh](https://github.com/user-attachments/files/23580737/all-tests.sh)\n\n| Test | Before | After |\n|--|--------|------|\n| should show the reset width button only for absolute width columns,\nand allow resetting to default width | 1268ms | 637ms |\n| should not reset the last column to auto width when there are\nremaining auto width columns | 894ms | 346ms |\n| should reset the last column to auto width if only absolute width\ncolumns remain | 893ms | 359ms |\n| All tests | 21.069s | 17.338s |\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"94c56027a853d2517c8b475b78814dd5c72c811d"}}]}] BACKPORT--> Co-authored-by: Alejandro García Parrondo <31973472+AlexGPlay@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #234829
Closes #240905
Closes #240904
All 3 tests were timing out so lets try to improve how fast they run - for this this PR changes from
get/queryByRoletoget/queryByTestIdas it speeds up the tests significantly.Times measured isolating the tests using
it.onlyand using the mean time of 10 runs + mean time of 10 runs of the whole file.Note
Both scripts to measure the test times were generated by ChatGPT
Individual tests where measured with this script +
it.only: run-tests.shThe whole test file was measured using this script: all-tests.sh
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.