Skip to content

Commit

Permalink
[Infra] Fix infra/services ftr tests (#178300)
Browse files Browse the repository at this point in the history
fixes [#176967](#176967)
fixes [#176950](#176950)

## Summary

Fix synthtrace call in setup and teardown to avoid cleaning the data
during test execution

Flaky test runner
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5424

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
crespocarlos and kibanamachine committed Mar 26, 2024
1 parent 88af92b commit 812adee
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions x-pack/test/api_integration/apis/metrics_ui/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@ export default function ({ getService }: FtrProviderContext) {
describe('GET /infra/services', () => {
const from = new Date(Date.now() - 1000 * 60 * 2).toISOString();
const to = new Date().toISOString();
// FLAKY: https://github.com/elastic/kibana/issues/176950
describe.skip('with transactions', () => {
before(async () => {
await synthtrace.index(
generateServicesData({ from, to, instanceCount: 3, servicesPerHost: 3 })
);
});
after(() => synthtrace.clean());

describe('with transactions', () => {
before(async () =>
synthtrace.index(generateServicesData({ from, to, instanceCount: 3, servicesPerHost: 3 }))
);
after(async () => synthtrace.clean());
it('returns no services with no data', async () => {
const filters = JSON.stringify({
'host.name': 'some-host',
Expand Down Expand Up @@ -82,14 +80,15 @@ export default function ({ getService }: FtrProviderContext) {
.expect(400);
});
});
// FLAKY: https://github.com/elastic/kibana/issues/176967
describe.skip('with logs only', () => {
describe('with logs only', () => {
before(async () => {
await synthtrace.index(
generateServicesLogsOnlyData({ from, to, instanceCount: 1, servicesPerHost: 2 })
);
});
after(() => synthtrace.clean());
after(async () => {
await synthtrace.clean();
});
it('should return services with logs only data', async () => {
const filters = JSON.stringify({
'host.name': 'host-0',
Expand Down

0 comments on commit 812adee

Please sign in to comment.