Skip to content

Commit

Permalink
[ML] Fix field stats assertions to match fields sampled (#118203)
Browse files Browse the repository at this point in the history
Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
qn895 and kibanamachine authored Nov 17, 2021
1 parent 8f158e6 commit 023df37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expect(finalRawResponse?.percentileThresholdValue).to.be(1309695.875);
expect(finalRawResponse?.errorHistogram?.length).to.be(101);
expect(finalRawResponse?.overallHistogram?.length).to.be(101);
expect(finalRawResponse?.fieldStats?.length).to.be(26);
expect(finalRawResponse?.fieldStats?.length).to.be(fieldsToSample.size);

expect(finalRawResponse?.failedTransactionsCorrelations?.length).to.eql(
30,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
{ config: 'trial', archives: ['8.0.0'] },
() => {
// putting this into a single `it` because the responses depend on each other
// FLAKY: https://github.com/elastic/kibana/issues/118023
it.skip('runs queries and returns results', async () => {
it('runs queries and returns results', async () => {
const overallDistributionResponse = await apmApiClient.readUser({
endpoint: 'POST /internal/apm/latency/overall_distribution',
params: {
Expand Down Expand Up @@ -210,7 +209,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
// Fetched 95th percentile value of 1309695.875 based on 1244 documents.
expect(finalRawResponse?.percentileThresholdValue).to.be(1309695.875);
expect(finalRawResponse?.overallHistogram?.length).to.be(101);
expect(finalRawResponse?.fieldStats?.length).to.be(12);
expect(finalRawResponse?.fieldStats?.length).to.be(fieldsToSample.size);

// Identified 13 significant correlations out of 379 field/value pairs.
expect(finalRawResponse?.latencyCorrelations?.length).to.eql(
Expand Down

0 comments on commit 023df37

Please sign in to comment.