Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: remove keys from other queues #3131

Merged
merged 2 commits into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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