Skip to content

Commit 7d69680

Browse files
committed
fix(test): debug failed lock expire test
1 parent 924287c commit 7d69680

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/job.test.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -844,15 +844,18 @@ describe('Job', () => {
844844
'lock job',
845845
async _job => {
846846
runCount++;
847+
console.log('runCount', runCount);
847848
if (runCount === 1) {
848849
// this should time out
849850
await new Promise(longResolve => setTimeout(longResolve, 1000));
850851
} else {
852+
await new Promise(longResolve => setTimeout(longResolve, 10));
851853
resolve(runCount);
852854
}
853855
},
854856
{
855-
lockLifetime: 50
857+
lockLifetime: 50,
858+
concurrency: 1
856859
}
857860
);
858861
});
@@ -1094,7 +1097,6 @@ describe('Job', () => {
10941097
const checkResultsPromise = new Promise(resolve =>
10951098
agenda.on('start:priority', job => {
10961099
results.push(job.attrs.priority);
1097-
console.log('RESULTS',results);
10981100
if (results.length !== 3) {
10991101
return;
11001102
}

0 commit comments

Comments
 (0)