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: X-Pack Fleet Agent API Integration Tests.x-pack/test/fleet_api_integration/apis/agents/request_diagnostics·ts - Agents fleet_request_diagnostics /agents/{agent_id}/request_diagnostics should work #183865

Closed
kibanamachine opened this issue May 20, 2024 · 2 comments · Fixed by #183871
Assignees
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Team:Fleet Team label for Observability Data Collection Fleet team

Comments

@kibanamachine
Copy link
Contributor

A test failed on a tracked branch

Error: expected 2 to sort of equal 3
    at Assertion.assert (expect.js:100:11)
    at Assertion.eql (expect.js:244:8)
    at verifyActionResult (request_diagnostics.ts:45:12)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Context.<anonymous> (request_diagnostics.ts:63:7)
    at Object.apply (wrap_function.js:73:16) {
  actual: '2',
  expected: '3',
  showDiff: true
}

First failure: kibana-on-merge - main

@kibanamachine kibanamachine added the failed-test A test failure on a tracked branch, potentially flaky-test label May 20, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label May 20, 2024
@kibanamachine kibanamachine added the Team:Fleet Team label for Observability Data Collection Fleet team label May 20, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@botelastic botelastic bot removed the needs-team Issues missing a team label label May 20, 2024
@kpollich
Copy link
Member

cc @jen-huang

@jen-huang jen-huang self-assigned this May 20, 2024
jen-huang added a commit that referenced this issue May 20, 2024
## Summary

Resolves #183865. The test here
using `moment.diff` fails if the expiration and creation time are off
even by even a fraction of a second. This PR makes the test more
tolerant by seeing if the difference is minutes is 3 hours-ish.
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue May 20, 2024
…#183871)

## Summary

Resolves elastic#183865. The test here
using `moment.diff` fails if the expiration and creation time are off
even by even a fraction of a second. This PR makes the test more
tolerant by seeing if the difference is minutes is 3 hours-ish.

(cherry picked from commit c529e5b)
kibanamachine added a commit that referenced this issue May 21, 2024
…183871) (#183881)

# Backport

This will backport the following commits from `main` to `8.14`:
- [[UII] Make request diagnostics expiration test more tolerant
(#183871)](#183871)

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

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

<!--BACKPORT [{"author":{"name":"Jen
Huang","email":"its.jenetic@gmail.com"},"sourceCommit":{"committedDate":"2024-05-20T22:58:44Z","message":"[UII]
Make request diagnostics expiration test more tolerant (#183871)\n\n##
Summary\r\n\r\nResolves #183865.
The test here\r\nusing `moment.diff` fails if the expiration and
creation time are off\r\neven by even a fraction of a second. This PR
makes the test more\r\ntolerant by seeing if the difference is minutes
is 3
hours-ish.","sha":"c529e5be09e684ffea1ad736c1e8faf66a8714fe","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v8.14.0","v8.15.0"],"title":"[UII]
Make request diagnostics expiration test more
tolerant","number":183871,"url":"#183871
Make request diagnostics expiration test more tolerant (#183871)\n\n##
Summary\r\n\r\nResolves #183865.
The test here\r\nusing `moment.diff` fails if the expiration and
creation time are off\r\neven by even a fraction of a second. This PR
makes the test more\r\ntolerant by seeing if the difference is minutes
is 3
hours-ish.","sha":"c529e5be09e684ffea1ad736c1e8faf66a8714fe"}},"sourceBranch":"main","suggestedTargetBranches":["8.14"],"targetPullRequestStates":[{"branch":"8.14","label":"v8.14.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"#183871
Make request diagnostics expiration test more tolerant (#183871)\n\n##
Summary\r\n\r\nResolves #183865.
The test here\r\nusing `moment.diff` fails if the expiration and
creation time are off\r\neven by even a fraction of a second. This PR
makes the test more\r\ntolerant by seeing if the difference is minutes
is 3 hours-ish.","sha":"c529e5be09e684ffea1ad736c1e8faf66a8714fe"}}]}]
BACKPORT-->

Co-authored-by: Jen Huang <its.jenetic@gmail.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:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants