Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
[uptime/usage-collector] add missing await (elastic#66079)
Browse files Browse the repository at this point in the history
  • Loading branch information
Spencer authored and spalger committed May 12, 2020
1 parent 0ba8361 commit 7f210a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

import { KibanaTelemetryAdapter } from '../kibana_telemetry_adapter';

jest
.spyOn(KibanaTelemetryAdapter, 'countNoOfUniqueMonitorAndLocations')
.mockResolvedValue(undefined as any);

describe('KibanaTelemetryAdapter', () => {
let usageCollection: any;
let getSavedObjectsClient: any;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class KibanaTelemetryAdapter {
fetch: async (callCluster: APICaller) => {
const savedObjectsClient = getSavedObjectsClient()!;
if (savedObjectsClient) {
this.countNoOfUniqueMonitorAndLocations(callCluster, savedObjectsClient);
await this.countNoOfUniqueMonitorAndLocations(callCluster, savedObjectsClient);
}
const report = this.getReport();
return { last_24_hours: { hits: { ...report } } };
Expand Down

0 comments on commit 7f210a7

Please sign in to comment.