Skip to content

[9.2] [Unified Data Table] Improve failing test speed (#243168)#245203

Merged
kibanamachine merged 1 commit into
elastic:9.2from
kibanamachine:backport/9.2/pr-243168
Dec 4, 2025
Merged

[9.2] [Unified Data Table] Improve failing test speed (#243168)#245203
kibanamachine merged 1 commit into
elastic:9.2from
kibanamachine:backport/9.2/pr-243168

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 9.2:

Questions ?

Please refer to the Backport tool documentation

@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Dec 4, 2025
@kibanamachine kibanamachine enabled auto-merge (squash) December 4, 2025 09:02
## 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)
@kibanamachine kibanamachine force-pushed the backport/9.2/pr-243168 branch from d1a0b20 to c4e7b05 Compare December 4, 2025 09:09
@kibanamachine kibanamachine merged commit 4e27ee0 into elastic:9.2 Dec 4, 2025
12 checks passed
@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
cloudSecurityPosture 629.5KB 629.5KB +48.0B
discover 1.2MB 1.2MB +48.0B
esql 565.1KB 565.2KB +48.0B
esqlDataGrid 149.0KB 149.1KB +48.0B
securitySolution 11.1MB 11.1MB +48.0B
slo 981.7KB 981.7KB +48.0B
total +288.0B

cc @AlexGPlay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants