Skip to content

Commit

Permalink
Tighten test timeouts.
Browse files Browse the repository at this point in the history
  • Loading branch information
ceejbot committed Jun 7, 2016
1 parent 62e75ba commit 73f8fac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
10 changes: 1 addition & 9 deletions lib/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,7 @@ FiveBeansRunner.prototype.readConfiguration = function()
FiveBeansRunner.prototype.createWorker = function()
{
var config = _.extend({}, this.readConfiguration());
var options = {
id: this.id,
host: config.beanstalkd.host,
port: config.beanstalkd.port,
handlers: config.handlers,
ignoreDefault: config.ignoreDefault
};

var worker = new FiveBeansWorker(options);
var worker = new FiveBeansWorker(config);

var logLevel = config.logLevel;
if (logLevel === 'info')
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ handlers:
watch:
- 'testtube'
ignoreDefault: true
timeout: 1
5 changes: 3 additions & 2 deletions test/test-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,22 @@ describe('FiveBeansRunner', function()
{
var worker;

it('returns a worker', function()
it('returns a worker', function(done)
{
var r = new fivebeans.runner('test', 'test/fixtures/runner.yml');
worker = r.createWorker();

worker.must.exist();
worker.must.be.an.object();
(worker instanceof fivebeans.worker).must.equal(true);
worker.once('started', done);
});

it('started the worker', function(done)
{
worker.stopped.must.equal(false);
worker.client.must.exist();
worker.on('stopped', done);
worker.once('stopped', done);
worker.stop();
});
});
Expand Down

0 comments on commit 73f8fac

Please sign in to comment.