Skip to content

Commit

Permalink
[ML] Update api integration test assertions.
Browse files Browse the repository at this point in the history
  • Loading branch information
walterra committed Sep 8, 2021
1 parent 7423546 commit f0a300e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,17 @@ export default function ApiTest({ getService }: FtrProviderContext) {
const { rawResponse: finalRawResponse } = followUpResult;

expect(typeof finalRawResponse?.took).to.be('number');
expect(finalRawResponse?.percentileThresholdValue).to.be(undefined);
expect(finalRawResponse?.overallHistogram).to.be(undefined);
expect(finalRawResponse?.percentileThresholdValue).to.be(1309695.875);
expect(finalRawResponse?.errorHistogram.length).to.be(101);
expect(finalRawResponse?.overallHistogram.length).to.be(101);

expect(finalRawResponse?.failedTransactionsCorrelations.length).to.eql(
30,
`Expected 30 identified correlations, got ${finalRawResponse?.failedTransactionsCorrelations.length}.`
);

expect(finalRawResponse?.log.map((d: string) => d.split(': ')[1])).to.eql([
'Fetched 95th percentile value of 1309695.875 based on 1244 documents.',
'Identified 68 fieldCandidates.',
'Identified correlations for 68 fields out of 68 candidates.',
'Identified 30 significant correlations relating to failed transactions.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
);

registry.when(
'Correlations latency with data and opbeans-node args',
'correlations latency with data and opbeans-node args',
{ config: 'trial', archives: ['8.0.0'] },
() => {
// putting this into a single `it` because the responses depend on each other
Expand Down

0 comments on commit f0a300e

Please sign in to comment.