From f0a1b8a81e7f652cc84042193d4814fe33f1a9bb Mon Sep 17 00:00:00 2001 From: Geoff Wagstaff Date: Wed, 28 Aug 2013 12:34:16 +0100 Subject: [PATCH] Test for closing queue when blocked --- test/queue.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/queue.js b/test/queue.js index 70772ad..0580e73 100644 --- a/test/queue.js +++ b/test/queue.js @@ -32,6 +32,15 @@ describe('Setting up a queue', function(){ q.close(done); }); + it('can close the queue when processing and queue empty (slow test)', function(done){ + var q = Convoy.createQueue('mrPowers'); + q.startProcessing(function(){ + throw new Error('You shouldnt see this message'); + }); + + q.close(done); + }); + it('can stop processing the queue', function(done){ var q = Convoy.createQueue('duckies'); var received = 0;