airport
Advanced tools
Comparing version 0.4.2 to 0.4.3
@@ -47,4 +47,3 @@ var upnode = require('upnode'); | ||
function onget (ps) { | ||
ports.removeListener('down', ondown); | ||
//ports.removeListener('down', ondown); | ||
var s = pick(ps); | ||
@@ -65,3 +64,5 @@ | ||
} | ||
if (this._ondown) ports.removeListener('down', this._ondown); | ||
ports.on('down', ondown); | ||
this._ondown = ondown; | ||
@@ -68,0 +69,0 @@ function connector (service, cb) { |
{ | ||
"name" : "airport", | ||
"description" : "role-based port management for upnode", | ||
"version" : "0.4.2", | ||
"version" : "0.4.3", | ||
"repository" : { | ||
@@ -30,3 +30,3 @@ "type" : "git", | ||
"devDependencies" : { | ||
"tap" : "~0.2.6" | ||
"tap" : "~0.3.0" | ||
}, | ||
@@ -33,0 +33,0 @@ "engines" : { |
@@ -6,3 +6,3 @@ var test = require('tap').test; | ||
test('hub goes down, server goes down', function (t) { | ||
t.plan(1); | ||
t.plan(2); | ||
@@ -26,25 +26,30 @@ var port = Math.floor(Math.random() * 5e4 + 1e4); | ||
ps.client.stdout.on('data', function (buf) { data += buf }); | ||
ps.client.stderr.pipe(process.stderr, { end : false }); | ||
function checkOutput () { | ||
t.same(data.split(/\r?\n/), [ 'up', 'down', 'up', '' ]); | ||
console.dir(data); | ||
t.same(data.split(/\r?\n/).slice(-3)[0], 'down'); | ||
t.same(data.split(/\r?\n/).slice(-2)[0], 'up'); | ||
} | ||
setTimeout(function () { | ||
ps.hub.kill(); | ||
ps.server.kill(); | ||
}, 2 * 1000); | ||
}, 1500); | ||
setTimeout(function () { | ||
ps.hub.kill(); | ||
}, 4 * 1000); | ||
ps.hub = sh('hub.js'); | ||
}, 2.5 * 1000); | ||
setTimeout(function () { | ||
ps.hub.kill(); | ||
ps.hub = sh('hub.js'); | ||
}, 6 * 1000); | ||
}, 4 * 1000); | ||
setTimeout(function () { | ||
ps.server = sh('server.js'); | ||
}, 10 * 1000); | ||
}, 4.5 * 1000); | ||
setTimeout(function () { | ||
checkOutput(); | ||
}, 15 * 1000); | ||
}, 8 * 1000); | ||
@@ -51,0 +56,0 @@ t.on('end', function () { |
Sorry, the diff of this file is not supported yet
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
24134
25
576
134
0
5