diff --git a/.github/workflows/bullmq-tests.yml b/.github/workflows/bullmq-tests.yml index 031bc741e5ae..ed938399c29b 100644 --- a/.github/workflows/bullmq-tests.yml +++ b/.github/workflows/bullmq-tests.yml @@ -66,11 +66,11 @@ jobs: #git clone https://github.com/taskforcesh/bullmq cd bullmq pwd - #patch -p1 -f < $GITHUB_WORKSPACE/bullmq.patch + patch -p1 -f < $GITHUB_WORKSPACE/bullmq.patch yarn install yarn build sed -i 's/timeout: 4000/timeout: 10000/' .mocharc.js - for i in {1..30}; do + for i in {1..100}; do BULLMQ_TEST_PREFIX={b} yarn test -g "should keep workers busy"; redis-cli info Commandstats done diff --git a/bullmq.patch b/bullmq.patch index f68ce33efb1c..fb7e9b61e591 100644 --- a/bullmq.patch +++ b/bullmq.patch @@ -1,22 +1,28 @@ -diff --git a/tests/test_job.ts b/tests/test_job.ts -index 0393fe0..57b06d6 100644 ---- a/tests/test_job.ts -+++ b/tests/test_job.ts -@@ -1396,6 +1396,8 @@ describe('Job', function () { - expect(isDelayedAfterPromote).to.be.equal(false); - const isCompleted = await job.isCompleted(); - expect(isCompleted).to.be.equal(true); -+ -+ await worker.close(); - }); +diff --git a/tests/test_bulk.ts b/tests/test_bulk.ts +index cdaa97ea7..ccf5e9d9c 100644 +--- a/tests/test_bulk.ts ++++ b/tests/test_bulk.ts +@@ -123,18 +123,23 @@ describe('bulk jobs', () => { + const numJobs = 6; + const queueEvents = new QueueEvents(queueName, { connection, prefix }); + await queueEvents.waitUntilReady(); ++ const gettime = () => '[' + new Date().toJSON() + ']'; - describe('when re-adding same repeatable job after previous delayed one is promoted', () => { -@@ -1456,6 +1458,8 @@ describe('Job', function () { - const delayedCountAfterReAddition = await queue.getDelayedCount(); - expect(completedCountAfterReAddition).to.be.equal(1); - expect(delayedCountAfterReAddition).to.be.equal(1); -+ -+ await worker.close(); - }); - }); - }); + const worker = new Worker( + queueName, + async () => { ++ console.log(`${gettime()} Pre wait 1`); + await delay(900); ++ console.log(`${gettime()} Post wait 1`); + }, + { connection, prefix }, + ); + const worker2 = new Worker( + queueName, + async () => { ++ console.log(`${gettime()} Pre wait 2`); + await delay(900); ++ console.log(`${gettime()} Post wait 2`); + }, + { connection, prefix }, + );