Skip to content

Commit

Permalink
Fix savedObjectsTagging FTR test flakiness (elastic#121626) (elastic#…
Browse files Browse the repository at this point in the history
…121648)

* Fix savedObjectsTagging FTR test flakiness

* set default value for refreshCache

Co-authored-by: Pierre Gayvallet <pierre.gayvallet@elastic.co>
  • Loading branch information
kibanamachine and pgayvallet authored Dec 20, 2021
1 parent 381dc13 commit 84dcccc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x-pack/test/api_integration/services/usage_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ export function UsageAPIProvider({ getService }: FtrProviderContext) {
*/
async getTelemetryStats(payload: {
unencrypted?: boolean;
refreshCache?: boolean;
}): Promise<ReturnType<TelemetryCollectionManagerPlugin['getStats']>> {
const { body } = await supertest
.post('/api/telemetry/v2/clusters/_stats')
.set('kbn-xsrf', 'xxx')
.send(payload)
.send({ refreshCache: true, ...payload })
.expect(200);
return body;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export default function ({ getService }: FtrProviderContext) {
it('collects the expected data', async () => {
const [{ stats: telemetryStats }] = (await usageAPI.getTelemetryStats({
unencrypted: true,
refreshCache: true,
})) as any;

const taggingStats = telemetryStats.stack_stats.kibana.plugins.saved_objects_tagging;
Expand Down

0 comments on commit 84dcccc

Please sign in to comment.