Skip to content

Commit abfd348

Browse files
committed
fix: 🐛 re-enable broken test
1 parent ef7b7af commit abfd348

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

test/job.js

+12-11
Original file line numberDiff line numberDiff line change
@@ -865,20 +865,21 @@ describe('Job', () => {
865865
});
866866

867867
// @todo fix this test
868-
// it('does not on-the-fly lock more than definition.lockLimit jobs', async() => {
869-
// agenda.define('lock job', {lockLimit: 1}, (job, cb) => {}); // eslint-disable-line no-unused-vars
868+
// does not on-the-fly lock more than definition.lockLimit jobs
869+
it('broken-test', async() => {
870+
agenda.define('lock job', {lockLimit: 1}, (job, cb) => {}); // eslint-disable-line no-unused-vars
870871

871-
// await agenda.start();
872+
await agenda.start();
872873

873-
// await Promise.all([
874-
// agenda.now('lock job', {i: 1}),
875-
// agenda.now('lock job', {i: 2})
876-
// ]);
874+
await Promise.all([
875+
agenda.now('lock job', {i: 1}),
876+
agenda.now('lock job', {i: 2})
877+
]);
877878

878-
// await delay(500);
879-
// expect(agenda._lockedJobs).to.have.length(1);
880-
// await agenda.stop();
881-
// });
879+
await delay(500);
880+
expect(agenda._lockedJobs).to.have.length(1);
881+
await agenda.stop();
882+
});
882883

883884
it('does not lock more than agenda._lockLimit jobs during processing interval', async() => {
884885
agenda.lockLimit(1);

0 commit comments

Comments
 (0)