test: fix assumption of worker exit on disconnect
authorSam Roberts <sam@strongloop.com>
Tue, 31 Dec 2013 05:36:49 +0000 (21:36 -0800)
committerTimothy J Fontaine <tjfontaine@gmail.com>
Tue, 31 Dec 2013 19:43:44 +0000 (11:43 -0800)
commitcb1646f44eb092f1771740fc5f0ec6775d5fbe73
treea82861a5bd908b04ca182821f271ec61db7767d0
parent876d3bd85aabe7fce71a025a89c6b3f6ddbf2053
test: fix assumption of worker exit on disconnect

Master was disconnecting its workers as soon as they both started up.
Meanwhile, the workers were trying to listen. Its a race, sometimes the
disconnect would happen between when worker gets the response message,
and acks that message with a 'listening'. This worked OK after v0.11
introduced a behaviour where disconnect would always exit the worker,
but once that backwards-incompatible behaviour is removed, the worker
lives long enough to try and respond to the master, and child_process
errors at the attempt to send from a disconnected child.
test/fixtures/clustered-server/app.js
test/simple/test-debug-cluster.js
test/simple/test-debug-port-cluster.js