[ML] Fix field stats assertions to match fields sampled (#118203) (#118936)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Quynh Nguyen <43350163+qn895@users.noreply.github.com>
This commit is contained in:
Kibana Machine 2021-11-17 16:32:12 -05:00 committed by GitHub
parent 70f1879326
commit 309df6c3df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View file

@ -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,

View file

@ -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: {
@ -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(