Skip to content

Commit

Permalink
fix(test): debug failed priority test
Browse files Browse the repository at this point in the history
  • Loading branch information
simllll committed Oct 20, 2020
1 parent e92cd85 commit 924287c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
language: node_js
sudo: required
node_js:
- 10
- 12
Expand Down
3 changes: 2 additions & 1 deletion test/job.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1089,11 +1089,12 @@ describe('Job', () => {
const now = new Date();
const results: number[] = [];

agenda.define('priority', (job, cb) => cb(), { concurrency: 1 });
agenda.define('priority', (job, cb) => setTimeout(cb, 10), { concurrency: 1 });

const checkResultsPromise = new Promise(resolve =>
agenda.on('start:priority', job => {
results.push(job.attrs.priority);
console.log('RESULTS',results);
if (results.length !== 3) {
return;
}
Expand Down

0 comments on commit 924287c

Please sign in to comment.