Comparing version 3.0.0 to 3.0.1
@@ -175,2 +175,6 @@ 'use strict'; | ||
if (!message) { | ||
return; | ||
} | ||
outstanding++; | ||
@@ -177,0 +181,0 @@ consumer(null, message, function(err) { |
{ | ||
"name": "dbqueue", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "A minimal, durable DB-based message queue system", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/elliotf/node-dbqueue", |
@@ -613,2 +613,26 @@ 'use strict'; | ||
}); | ||
context('when there are no messages', function() { | ||
it('does not call the consumer', function(done) { | ||
var clock = this.sinon.useFakeTimers(); | ||
var consumer = this.sinon.spy(); | ||
this.sinon.stub(queue, 'consume', function(queue_name, consume_options, done) { | ||
return done(); | ||
}); | ||
listen_options = { | ||
max_outstanding: 2, | ||
lock_time: 3000, | ||
interval: 100, | ||
}; | ||
queue.listen('an empty queue', listen_options, consumer); | ||
clock.tick(30000); | ||
expect(consumer).to.have.callCount(0); | ||
return done(); | ||
}); | ||
}); | ||
}); | ||
@@ -615,0 +639,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41761
917