Skip to content

Commit

Permalink
Add a test to attempt to reproduce the behavior described in issue #24.
Browse files Browse the repository at this point in the history
This test passes, so I haven't figured out what the root cause of the
problem is yet.
  • Loading branch information
ceejbot committed Jan 10, 2014
1 parent 1cec154 commit 2a8ebc4
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/test-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,27 @@ describe('FiveBeansClient', function()
});
});

it('consumer can run stats_job() while a job is reserved', function(done)
{
consumer.reserve(function(err, jobid, payload)
{
should.not.exist(err);
consumer.stats_job(jobid, function(err, res)
{
should.not.exist(err);
res.should.be.an('object');
res.should.have.property('id');
res.id.should.equal(parseInt(jobid, 10));
res.state.should.equal('reserved');
consumer.release(jobid, 1, 1, function(err)
{
should.not.exist(err);
done();
});
});
});
});

it('#reserve() returns a job', function(done)
{
consumer.reserve(function(err, jobid, payload)
Expand Down

0 comments on commit 2a8ebc4

Please sign in to comment.