Skip to content

Commit

Permalink
chore(arns): fix arns count test
Browse files Browse the repository at this point in the history
  • Loading branch information
dtfiedler authored and dtfiedler committed Oct 23, 2024
1 parent 6db5df7 commit d3f7add
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/monitor/monitor.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -484,8 +484,8 @@ describe('setup', () => {
const twoWeeks = 2 * 7 * 24 * 60 * 60 * 1000;
it('should not have any arns records older than two weeks', async () => {
let cursor = '';
let countedTotalArns = 0;
let totalArns = 0;
const uniqueNames = new Set();
do {
const {
items: arns,
Expand All @@ -495,8 +495,8 @@ describe('setup', () => {
cursor,
});
totalArns = totalItems;
countedTotalArns += arns.length;
for (const arn of arns) {
uniqueNames.add(arn.name);
assert(arn.processId, `ARNs name '${arn.name}' has no processId`);
assert(arn.type, `ARNs name '${arn.name}' has no type`);
assert(
Expand Down Expand Up @@ -532,8 +532,8 @@ describe('setup', () => {
cursor = nextCursor;
} while (cursor !== undefined);
assert(
countedTotalArns === totalArns,
`Counted total ARNs (${countedTotalArns}) does not match total ARNs (${totalArns})`,
uniqueNames.size === totalArns,
`Counted total ARNs (${uniqueNames.size}) does not match total ARNs (${totalArns})`,
);
});
});
Expand Down

0 comments on commit d3f7add

Please sign in to comment.