Skip to content

Commit

Permalink
Flaky FTR: Retry telemetry config get (#204354)
Browse files Browse the repository at this point in the history
  • Loading branch information
afharo authored Dec 16, 2024
1 parent 2ed3442 commit a8eb7ca
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ export default function telemetryConfigTest({ getService }: FtrProviderContext)
.send({ 'telemetry.labels.journeyName': 'my-ftr-test' })
.expect(200, { ok: true });

await supertestAdminWithApiKey.get('/api/telemetry/v2/config').expect(200, {
...initialConfig,
labels: {
...initialConfig.labels,
journeyName: 'my-ftr-test',
},
await retry.tryForTime(retryTimeout, async function retryTelemetryConfigGetRequest() {
const { body } = await supertestAdminWithApiKey.get('/api/telemetry/v2/config').expect(200);
expect(body).to.eql(
{ ...initialConfig, labels: { ...initialConfig.labels, journeyName: 'my-ftr-test' } },
`Expected the response body to include the dynamically set telemetry.labels.journeyName, but got: [${body}]`
);
});

// Sends "null" to remove the label
Expand All @@ -78,7 +78,7 @@ export default function telemetryConfigTest({ getService }: FtrProviderContext)
const { body } = await supertestAdminWithApiKey.get('/api/telemetry/v2/config').expect(200);
expect(body).to.eql(
initialConfig,
`Expected the response body to match the intitial config, but got: [${body}]`
`Expected the response body to match the initial config, but got: [${body}]`
);
});
});
Expand Down

0 comments on commit a8eb7ca

Please sign in to comment.