Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed failing tests

  • Loading branch information...
commit b267c5155327cf44f7dab5d952226d683a1c5a30 1 parent 8b8aaa4
@chriso authored
Showing with 15 additions and 3 deletions.
  1. +12 −2 lib/node.io/processor.js
  2. +3 −1 test/request.test.js
View
14 lib/node.io/processor.js
@@ -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) {
@@ -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;
View
4 test/request.test.js
@@ -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)');
}
Please sign in to comment.
Something went wrong with that request. Please try again.