Skip to content

Commit

Permalink
[APM] Fix for flaky correlations API test (#91673) (#92094)
Browse files Browse the repository at this point in the history
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
ogupte and kibanamachine committed Feb 22, 2021
1 parent 4911540 commit d1b27d7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
start: range.start,
end: range.end,
durationPercentile: 95,
fieldNames:
'user.username,user.id,host.ip,user_agent.name,kubernetes.pod.uuid,url.domain,container.id,service.node.name',
fieldNames: 'user_agent.name,user_agent.os.name,url.original',
},
});

Expand Down Expand Up @@ -53,19 +52,22 @@ export default function ApiTest({ getService }: FtrProviderContext) {
});

it('returns significant terms', () => {
const sorted = response.body?.significantTerms?.sort();
expectSnapshot(sorted?.map((term) => term.fieldName)).toMatchInline(`
const significantTerms = response.body?.significantTerms as NonNullable<
typeof response.body.significantTerms
>;
expect(significantTerms).to.have.length(9);
const sortedFieldNames = significantTerms.map(({ fieldName }) => fieldName).sort();
expectSnapshot(sortedFieldNames).toMatchInline(`
Array [
"url.original",
"url.original",
"url.original",
"url.original",
"user_agent.name",
"url.domain",
"host.ip",
"service.node.name",
"container.id",
"url.domain",
"host.ip",
"service.node.name",
"container.id",
"user_agent.name",
"user_agent.name",
"user_agent.os.name",
"user_agent.os.name",
]
`);
});
Expand All @@ -83,7 +85,6 @@ export default function ApiTest({ getService }: FtrProviderContext) {
15,
15,
15,
15,
]
`);
});
Expand Down
3 changes: 1 addition & 2 deletions x-pack/test/apm_api_integration/tests/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ export default function apmApiIntegrationTests(providerContext: FtrProviderConte
this.tags('ciGroup1');
loadTestFile(require.resolve('./alerts/chart_preview'));

// Flaky, see https://github.com/elastic/kibana/issues/91673
// loadTestFile(require.resolve('./correlations/slow_transactions'));
loadTestFile(require.resolve('./correlations/slow_transactions'));

loadTestFile(require.resolve('./csm/csm_services'));
loadTestFile(require.resolve('./csm/has_rum_data'));
Expand Down

0 comments on commit d1b27d7

Please sign in to comment.