Permalink
Browse files

hub/server down test fails properly again

  • Loading branch information...
substack committed May 24, 2012
1 parent 029d77f commit bcccaf26f0dac72b29c30721a00deb1a5bd3b4c6
Showing with 8 additions and 9 deletions.
  1. +8 −9 test/hub_down_server_down.js
@@ -23,29 +23,28 @@ test('hub goes down, server goes down', function (t) {
var data = '';
ps.client.stdout.on('data', function (buf) { data += buf });
function checkOutput () {
- t.same(data.split(/\r?\n/), [ 'up', 'down', 'up', 'down', '' ]);
+ t.same(data.split(/\r?\n/), [ 'up', 'down', 'up', '' ]);
}
setTimeout(function () {
- ps.hub.kill();
+ ps.server.kill();
}, 2 * 1000);
setTimeout(function () {
- ps.server.kill();
- }, 3 * 1000);
+ ps.hub.kill();
+ }, 4 * 1000);
setTimeout(function () {
- ps.server = sh('server.js');
ps.hub = sh('hub.js');
- }, 5 * 1000);
+ }, 6 * 1000);
setTimeout(function () {
- ps.server.kill();
- }, 7 * 1000);
+ ps.server = sh('server.js');
+ }, 10 * 1000);
setTimeout(function () {
checkOutput();
- }, 10 * 1000);
+ }, 15 * 1000);
t.on('end', function () {
ps.hub.kill();

0 comments on commit bcccaf2

Please sign in to comment.