kibana/x-pack/test/apm_api_integration
Kibana Machine 0e64d0c4c0
[8.x] [APM] Attemp to fix flaky test in input_only_package.spec.ts (#206432) (#206575)
# Backport

This will backport the following commits from `main` to `8.x`:
- [[APM] Attemp to fix flaky test in input_only_package.spec.ts
(#206432)](https://github.com/elastic/kibana/pull/206432)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Irene
Blanco","email":"irene.blanco@elastic.co"},"sourceCommit":{"committedDate":"2025-01-14T13:24:22Z","message":"[APM]
Attemp to fix flaky test in input_only_package.spec.ts (#206432)\n\n##
Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/201069\r\n\r\nThis PR addresses
a flaky test issue in the APM package policy test\r\nsuite.\r\n\r\nAt
times, the latency of a service with ingested Synthtrace data
was\r\nincorrect because one of the transactions had not been processed
by the\r\ntime the test expectation was evaluated.\r\n\r\nSince there’s
no way to confirm when the transaction has been processed\r\nand
indexed, a retry strategy has been added. It will attempt the check\r\n3
times, with a 100ms delay between each attempt, in an effort
to\r\nmitigate the flakiness of the test.\r\n\r\nWe also considered the
possibility of not checking the latency\r\nspecifically and simply
verifying that its value is > 0. However, by\r\nkeeping the exact value,
we maintain the strict validation that ensures\r\nthe correctness of the
calculations for the
latency.","sha":"fd2d1ba3dca7fc00c2b2331b4822ed156d1da7df","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-infra_services","v8.18.0"],"title":"[APM]
Attemp to fix flaky test in
input_only_package.spec.ts","number":206432,"url":"https://github.com/elastic/kibana/pull/206432","mergeCommit":{"message":"[APM]
Attemp to fix flaky test in input_only_package.spec.ts (#206432)\n\n##
Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/201069\r\n\r\nThis PR addresses
a flaky test issue in the APM package policy test\r\nsuite.\r\n\r\nAt
times, the latency of a service with ingested Synthtrace data
was\r\nincorrect because one of the transactions had not been processed
by the\r\ntime the test expectation was evaluated.\r\n\r\nSince there’s
no way to confirm when the transaction has been processed\r\nand
indexed, a retry strategy has been added. It will attempt the check\r\n3
times, with a 100ms delay between each attempt, in an effort
to\r\nmitigate the flakiness of the test.\r\n\r\nWe also considered the
possibility of not checking the latency\r\nspecifically and simply
verifying that its value is > 0. However, by\r\nkeeping the exact value,
we maintain the strict validation that ensures\r\nthe correctness of the
calculations for the
latency.","sha":"fd2d1ba3dca7fc00c2b2331b4822ed156d1da7df"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/206432","number":206432,"mergeCommit":{"message":"[APM]
Attemp to fix flaky test in input_only_package.spec.ts (#206432)\n\n##
Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/201069\r\n\r\nThis PR addresses
a flaky test issue in the APM package policy test\r\nsuite.\r\n\r\nAt
times, the latency of a service with ingested Synthtrace data
was\r\nincorrect because one of the transactions had not been processed
by the\r\ntime the test expectation was evaluated.\r\n\r\nSince there’s
no way to confirm when the transaction has been processed\r\nand
indexed, a retry strategy has been added. It will attempt the check\r\n3
times, with a 100ms delay between each attempt, in an effort
to\r\nmitigate the flakiness of the test.\r\n\r\nWe also considered the
possibility of not checking the latency\r\nspecifically and simply
verifying that its value is > 0. However, by\r\nkeeping the exact value,
we maintain the strict validation that ensures\r\nthe correctness of the
calculations for the
latency.","sha":"fd2d1ba3dca7fc00c2b2331b4822ed156d1da7df"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Irene Blanco <irene.blanco@elastic.co>
2025-01-14 14:56:53 +00:00
..
basic
cloud [APM] Fleet migration support for bundled APM package (#153159) 2023-04-19 09:31:15 -04:00
common [8.x] [APM] Revert deletion of service agent test (#200196) (#200535) 2024-11-18 06:41:29 -06:00
configs [APM] Simplify cleanup of alerts in API tests (#170111) 2023-10-31 15:23:34 +02:00
rules [RAC] Rule registry plugin (#95903) 2021-04-09 10:35:44 +02:00
tests [8.x] [APM] Attemp to fix flaky test in input_only_package.spec.ts (#206432) (#206575) 2025-01-14 14:56:53 +00:00
trial
utils.ts [8.x] Migrate /custom_dashboards to be deployment agnostic (#199295) (#199661) 2024-11-11 11:03:31 -06:00