Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing test: Jest Tests.x-pack/plugins/observability_solution/apm_data_access/server/lib/helpers/create_es_client/create_apm_event_client - APMEventClient cancels a search when a request is aborted #190703

Closed
kibanamachine opened this issue Aug 19, 2024 · 5 comments · Fixed by #191268 or #193049
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team

Comments

@kibanamachine
Copy link
Contributor

kibanamachine commented Aug 19, 2024

A test failed on a tracked branch

Error: expect(received).toBe(expected) // Object.is equality

Expected: true
Received: undefined
    at Object.toBe (/opt/buildkite-agent/builds/bk-agent-prod-gcp-1724073408411318108/elastic/kibana-on-merge/kibana/x-pack/plugins/observability_solution/apm_data_access/server/lib/helpers/create_es_client/create_apm_event_client/index.test.ts:81:34)

First failure: kibana-on-merge - main

@kibanamachine kibanamachine added the failed-test A test failure on a tracked branch, potentially flaky-test label Aug 19, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Aug 19, 2024
@kibanamachine kibanamachine added Team:obs-knowledge Observability Experience Knowledge team Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team labels Aug 19, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-knowledge-team (Team:obs-knowledge)

@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Aug 19, 2024
@emma-raffenne emma-raffenne removed the Team:obs-knowledge Observability Experience Knowledge team label Aug 20, 2024
@crespocarlos crespocarlos self-assigned this Aug 26, 2024
crespocarlos added a commit that referenced this issue Aug 27, 2024
closes [190703](#190703)

## Summary

I'm not sure if this change will resolve the flakiness. What I
discovered is that the test had an open handle due to an unfinished
promise.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@kibanamachine kibanamachine reopened this Sep 3, 2024
@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - main

@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - main

@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - 8.x

crespocarlos added a commit that referenced this issue Sep 17, 2024
fixes #190703

## Summary

The problem seems to be on the `void` keyword used when calling
`incomingRequest.abort()`.

I ran a few tests changing the `setTimeout` interval with and without
using the `void` keyword, and the test always passed when running
without it.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Sep 17, 2024
fixes elastic#190703

## Summary

The problem seems to be on the `void` keyword used when calling
`incomingRequest.abort()`.

I ran a few tests changing the `setTimeout` interval with and without
using the `void` keyword, and the test always passed when running
without it.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit f4fe0bd)
kibanamachine referenced this issue Sep 18, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [[APM] Attempt to fix APMEventClient unit test
(#193049)](#193049)

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

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

<!--BACKPORT [{"author":{"name":"Carlos
Crespo","email":"crespocarlos@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-09-17T13:25:34Z","message":"[APM]
Attempt to fix APMEventClient unit test (#193049)\n\nfixes
https://github.com/elastic/kibana/issues/190703\r\n\r\n##
Summary\r\n\r\nThe problem seems to be on the `void` keyword used when
calling\r\n`incomingRequest.abort()`.\r\n\r\nI ran a few tests changing
the `setTimeout` interval with and without\r\nusing the `void` keyword,
and the test always passed when running\r\nwithout
it.\r\n\r\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"f4fe0bdaabaf8a8fddfc1d498743bd8a03c557e0","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.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.16.0"],"title":"[APM]
Attempt to fix APMEventClient unit
test","number":193049,"url":"https://github.com/elastic/kibana/pull/193049","mergeCommit":{"message":"[APM]
Attempt to fix APMEventClient unit test (#193049)\n\nfixes
https://github.com/elastic/kibana/issues/190703\r\n\r\n##
Summary\r\n\r\nThe problem seems to be on the `void` keyword used when
calling\r\n`incomingRequest.abort()`.\r\n\r\nI ran a few tests changing
the `setTimeout` interval with and without\r\nusing the `void` keyword,
and the test always passed when running\r\nwithout
it.\r\n\r\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"f4fe0bdaabaf8a8fddfc1d498743bd8a03c557e0"}},"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/193049","number":193049,"mergeCommit":{"message":"[APM]
Attempt to fix APMEventClient unit test (#193049)\n\nfixes
https://github.com/elastic/kibana/issues/190703\r\n\r\n##
Summary\r\n\r\nThe problem seems to be on the `void` keyword used when
calling\r\n`incomingRequest.abort()`.\r\n\r\nI ran a few tests changing
the `setTimeout` interval with and without\r\nusing the `void` keyword,
and the test always passed when running\r\nwithout
it.\r\n\r\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"f4fe0bdaabaf8a8fddfc1d498743bd8a03c557e0"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Carlos Crespo <crespocarlos@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team
Projects
None yet
4 participants