Skip to content

Commit

Permalink
fix: unlock job test needs cb (agenda#1138)
Browse files Browse the repository at this point in the history
* fix: unlock job test needs cb

Co-authored-by: Mikael Korpela <mikael@ihminen.org>
  • Loading branch information
simllll and simison authored Oct 31, 2020
1 parent ff9dd7a commit bfb5603
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/job.js
Original file line number Diff line number Diff line change
Expand Up @@ -642,8 +642,8 @@ describe('Job', () => {
});

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

0 comments on commit bfb5603

Please sign in to comment.