Permalink
Browse files

.close() the tests to prevent zombies from piling up

  • Loading branch information...
1 parent 77e4aaa commit 2bb370dbcab89f21f1f1789210735cb81bed36ed @substack committed Apr 3, 2013
Showing with 8 additions and 1 deletion.
  1. +5 −1 index.js
  2. +1 −0 test/deploy.js
  3. +1 −0 test/install.js
  4. +1 −0 test/multi.js
View
@@ -191,7 +191,11 @@ Ploy.prototype.address = function () {
};
Ploy.prototype.close = function () {
- this.bouncer.close();
+ var self = this;
+ self.bouncer.close();
+ Object.keys(self.branches).forEach(function (name) {
+ self.remove(name);
+ });
};
Ploy.prototype.handle = function (req, res) {
View
@@ -19,6 +19,7 @@ function teardown (t) {
ps.stderr.pipe(process.stderr);
ps.on('exit', t.end.bind(t));
t.on('end', function () {
+ server.close();
setTimeout(process.exit, 500);
});
}
View
@@ -19,6 +19,7 @@ function teardown (t) {
ps.stderr.pipe(process.stderr);
ps.on('exit', t.end.bind(t));
t.on('end', function () {
+ server.close();
setTimeout(process.exit, 500);
});
}
View
@@ -19,6 +19,7 @@ function teardown (t) {
ps.stderr.pipe(process.stderr);
ps.on('exit', t.end.bind(t));
t.on('end', function () {
+ server.close();
setTimeout(process.exit, 500);
});
}

0 comments on commit 2bb370d

Please sign in to comment.