Skip to content

Commit

Permalink
[8.x] enable skipped `inputs_with_standalone_docker_agent` …
Browse files Browse the repository at this point in the history
…test (elastic#202131) (elastic#202197)

# Backport

This will backport the following commits from `main` to `8.x`:
- [enable skipped `inputs_with_standalone_docker_agent` test
(elastic#202131)](elastic#202131)

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

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

<!--BACKPORT [{"author":{"name":"Julia
Bardi","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-28T15:41:26Z","message":"enable
skipped `inputs_with_standalone_docker_agent` test (elastic#202131)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/193625\r\n\r\nCatch es errors
in the test, to let it retry.\r\nFlaky test runner passed 125
times.\r\n\r\n\r\n### Checklist\r\n\r\n- [x] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests
changed","sha":"0d1f89a5f346e7d775d58da6a38b5ca68ce37340","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","backport:prev-minor"],"title":"enable
skipped `inputs_with_standalone_docker_agent`
test","number":202131,"url":"https://github.com/elastic/kibana/pull/202131","mergeCommit":{"message":"enable
skipped `inputs_with_standalone_docker_agent` test (elastic#202131)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/193625\r\n\r\nCatch es errors
in the test, to let it retry.\r\nFlaky test runner passed 125
times.\r\n\r\n\r\n### Checklist\r\n\r\n- [x] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests
changed","sha":"0d1f89a5f346e7d775d58da6a38b5ca68ce37340"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202131","number":202131,"mergeCommit":{"message":"enable
skipped `inputs_with_standalone_docker_agent` test (elastic#202131)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/193625\r\n\r\nCatch es errors
in the test, to let it retry.\r\nFlaky test runner passed 125
times.\r\n\r\n\r\n### Checklist\r\n\r\n- [x] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests
changed","sha":"0d1f89a5f346e7d775d58da6a38b5ca68ce37340"}}]}]
BACKPORT-->

Co-authored-by: Julia Bardi <[email protected]>
  • Loading branch information
kibanamachine and juliaElastic authored Nov 28, 2024
1 parent 96890b7 commit f7f52a5
Showing 1 changed file with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ export default function (providerContext: FtrProviderContext) {
const config = getService('config');
const log = getService('log');

// Failing: See https://github.com/elastic/kibana/issues/193625
describe.skip('inputs_with_standalone_docker_agent', () => {
describe('inputs_with_standalone_docker_agent', () => {
skipIfNoDockerRegistry(providerContext);
let apiKey: string;
let agent: AgentProcess;
Expand Down Expand Up @@ -77,17 +76,22 @@ ${inputsYaml}
const MAX_ITERATIONS = 20;
let foundMetrics = false;
for (let i = 0; i < MAX_ITERATIONS; i++) {
const searchRes = await es.search({
index: 'metrics-system.cpu-default',
q: `agent.name:${agent.name}`,
ignore_unavailable: true,
});

// @ts-expect-error TotalHit
if (searchRes.hits.total.value > 0) {
foundMetrics = true;
break;
try {
const searchRes = await es.search({
index: 'metrics-system.cpu-default',
q: `agent.name:${agent.name}`,
ignore_unavailable: true,
});

// @ts-expect-error TotalHit
if (searchRes.hits.total.value > 0) {
foundMetrics = true;
break;
}
} catch (err) {
log.error(err);
}

// await agent.log(); uncomment if you need to debug agent logs
await new Promise((resolve) => setTimeout(resolve, 5 * 1000));
}
Expand Down

0 comments on commit f7f52a5

Please sign in to comment.