Skip to content

Commit

Permalink
Fixed failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chriso committed Nov 23, 2010
1 parent 8b8aaa4 commit b267c51
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
14 changes: 12 additions & 2 deletions lib/node.io/processor.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,16 @@ Processor.prototype.startJob = function (job, job_obj, oncomplete) {

//Call the oncomplete function on error
j.obj.error_hook = j.oncomplete;

j.obj.debug = function (msg) {
if (self.options.debug) {
self.status(msg, 'debug');
}
};

j.obj.info = function (msg) {
self.status(msg);
};

if (distribute) {

Expand Down Expand Up @@ -684,11 +694,11 @@ Processor.prototype.instanceStart = function (job, input) {
if (self.options.debug) {
self.status(msg, 'debug');
}
}
};

instance.info = function(msg) {
self.status(msg);
}
};

instance.error_hook = j.oncomplete;

Expand Down
4 changes: 3 additions & 1 deletion test/request.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ var i = 24510;

//Why do these tests fail on linux?! D:

job.debug = function () {};

//Throw a warning on ECONNREFUSED rather than fail the entire test suite
job.fail = function(input, status) {
job.fail = function (input, status) {
if (status === 'ECONNREFUSED') {
console.log('\x1B[33mWARNING\x1B[0m: \x1B[31mECONNREFUSED\x1B[0m (see request.test.js)');
}
Expand Down

0 comments on commit b267c51

Please sign in to comment.