Skip to content

Commit bfb5603

Browse files
simllllsimison
andauthored
fix: unlock job test needs cb (#1138)
* fix: unlock job test needs cb Co-authored-by: Mikael Korpela <mikael@ihminen.org>
1 parent ff9dd7a commit bfb5603

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/job.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -642,8 +642,8 @@ describe('Job', () => {
642642
});
643643

644644
it('clears locks on stop', async() => {
645-
agenda.define('longRunningJob', job => { // eslint-disable-line no-unused-vars
646-
// Job never finishes
645+
agenda.define('longRunningJob', (job, cb) => { // eslint-disable-line no-unused-vars
646+
// Job never finishes (the 2nd parameter is important, otherwise the job finishes immediately)
647647
});
648648
agenda.every('10 seconds', 'longRunningJob');
649649
agenda.processEvery('1 second');

0 commit comments

Comments
 (0)