[8.15] [APM] Unskip get environment test (#188010) (#188094)

# Backport

This will backport the following commits from `main` to `8.15`:
- [[APM] Unskip get environment test
(#188010)](https://github.com/elastic/kibana/pull/188010)

<!--- 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-07-11T11:29:53Z","message":"[APM]
Unskip get environment test (#188010)\n\nFixes
[177305](https://github.com/elastic/kibana/issues/177305)\r\n\r\n##
Summary\r\n\r\nAnother problem related to synthtrace not completing the
creation of\r\ndocs before the test case
execution\r\n\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6514","sha":"976fed697d9e1d98563cd9911bb13b22f0cba9e8","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-infra_services","v8.16.0"],"title":"[APM]
Unskip get environment
test","number":188010,"url":"https://github.com/elastic/kibana/pull/188010","mergeCommit":{"message":"[APM]
Unskip get environment test (#188010)\n\nFixes
[177305](https://github.com/elastic/kibana/issues/177305)\r\n\r\n##
Summary\r\n\r\nAnother problem related to synthtrace not completing the
creation of\r\ndocs before the test case
execution\r\n\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6514","sha":"976fed697d9e1d98563cd9911bb13b22f0cba9e8"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/188010","number":188010,"mergeCommit":{"message":"[APM]
Unskip get environment test (#188010)\n\nFixes
[177305](https://github.com/elastic/kibana/issues/177305)\r\n\r\n##
Summary\r\n\r\nAnother problem related to synthtrace not completing the
creation of\r\ndocs before the test case
execution\r\n\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6514","sha":"976fed697d9e1d98563cd9911bb13b22f0cba9e8"}}]}]
BACKPORT-->

Co-authored-by: Carlos Crespo <crespocarlos@users.noreply.github.com>
This commit is contained in:
Kibana Machine 2024-07-11 15:13:10 +02:00 committed by GitHub
parent 3b4895704b
commit 001dbc08f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 6 deletions

View file

@ -63,5 +63,5 @@ export async function generateData({
return [...loopGeneratedDocs, customDoc];
});
await apmSynthtraceEsClient.index(docs);
return apmSynthtraceEsClient.index(docs);
}

View file

@ -19,15 +19,14 @@ export default function environmentsAPITests({ getService }: FtrProviderContext)
const apmApiClient = getService('apmApiClient');
const apmSynthtraceEsClient = getService('apmSynthtraceEsClient');
// FLAKY: https://github.com/elastic/kibana/issues/177305
registry.when('environments when data is loaded', { config: 'basic', archives: [] }, async () => {
before(async () => {
await generateData({
before(async () =>
generateData({
apmSynthtraceEsClient,
start: startNumber,
end: endNumber,
});
});
})
);
after(() => apmSynthtraceEsClient.clean());