Skip to content

Commit

Permalink
test: remove keys from other queues (#3131)
Browse files Browse the repository at this point in the history
  • Loading branch information
roggervalf authored Mar 11, 2025
1 parent 0a78e52 commit 94008ac
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 0 additions & 4 deletions tests/test_concurrency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,6 @@ describe('Concurrency', () => {
'completed',
// after every job has been completed
after(numJobs, async () => {
await worker.close();

try {
const timeDiff = new Date().getTime() - startTime;
expect(timeDiff).to.be.gte(
Expand Down Expand Up @@ -342,8 +340,6 @@ describe('Concurrency', () => {
'completed',
// after every job has been completed
after(numJobs, async () => {
await worker.close();

try {
const timeDiff = new Date().getTime() - startTime;
expect(timeDiff).to.be.gte(numJobs * dynamicLimit);
Expand Down
8 changes: 8 additions & 0 deletions tests/test_flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1076,6 +1076,8 @@ describe('flows', () => {
await worker.close();
await childrenWorker.close();
await grandchildrenWorker.close();
await removeAllQueueData(new IORedis(redisHost), childrenQueueName);
await removeAllQueueData(new IORedis(redisHost), grandchildrenQueueName);
});
});

Expand Down Expand Up @@ -1468,6 +1470,7 @@ describe('flows', () => {
await flow.close();

await removeAllQueueData(new IORedis(redisHost), parentQueueName);
await removeAllQueueData(new IORedis(redisHost), grandchildrenQueueName);
}).timeout(8000);
});

Expand Down Expand Up @@ -2372,6 +2375,11 @@ describe('flows', () => {
await flow.close();
await worker.close();
await grandchildrenWorker.close();
await removeAllQueueData(new IORedis(redisHost), childrenQueueName);
await removeAllQueueData(
new IORedis(redisHost),
grandchildrenQueueName,
);
});
});

Expand Down
2 changes: 2 additions & 0 deletions tests/test_worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3339,6 +3339,7 @@ describe('workers', function () {
await worker.close();
await childrenWorker.close();
await parentQueue.close();
await removeAllQueueData(new IORedis(redisHost), parentQueueName);
});

describe('when skip attempt option is provided as true', () => {
Expand Down Expand Up @@ -3461,6 +3462,7 @@ describe('workers', function () {
await worker.close();
await childrenWorker.close();
await parentQueue.close();
await removeAllQueueData(new IORedis(redisHost), parentQueueName);
});
});
});
Expand Down

0 comments on commit 94008ac

Please sign in to comment.