Skip to content

Commit

Permalink
fixup! Test that federated metrics are retrieved
Browse files Browse the repository at this point in the history
  • Loading branch information
francoisferrand committed Oct 21, 2024
1 parent 4b17e20 commit a0ef86b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/ctst/steps/pra.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,15 @@ Then('prometheus should scrap federated metrics from DR sink', { timeout: 60000
baseURL: '/api/v1',
});

const t = Date.now();
const metrics = await prom.series('{drSinkInstance="end2end-pra-sink"}', t - 60 * 1000, t);
assert(metrics.length > 0);
while(1) {
const t = Date.now();
const metrics = await prom.series('{drSinkInstance="end2end-pra"}', t - 60 * 1000, t);
if (metrics.length > 0) {
break;
}

await Utils.sleep(1000);
}
});

const failoverTimeout = 360000;
Expand Down

0 comments on commit a0ef86b

Please sign in to comment.