Skip to content

Commit

Permalink
cluster: fix broken/hanging tests
Browse files Browse the repository at this point in the history
Fixes: #1933
  • Loading branch information
Olegas committed Jun 11, 2015
1 parent 9f3a03f commit c2b44a4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/parallel/test-cluster-worker-wait-server-close.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ if (cluster.isWorker) {
worker.once('listening', function() {
net.createConnection(common.PORT, common.localhostIPv4, function() {
var socket = this;
worker.disconnect();
setTimeout(function() {
socket.write('.');
connectionDone = true;
worker.disconnect();
setTimeout(function() {
socket.write('.');
connectionDone = true;
}, 1000);
}, 1000);
});
});
Expand Down

0 comments on commit c2b44a4

Please sign in to comment.