Skip to content

Commit

Permalink
test: refactor switch
Browse files Browse the repository at this point in the history
`test-child-process-fork-net2.js` has a switch statement with 6 cases.
Each case uses `child.send()`, passing an object for the callback.
`child.send()` ignores the callback because it is not a function.
Removing the unused argument.

PR-URL: #4870
Reviewed-By: Alexis Campailla <[email protected]>
  • Loading branch information
Trott authored and rvagg committed Jan 28, 2016
1 parent 31bc5c5 commit 980395a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/parallel/test-child-process-fork-net2.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,17 @@ if (process.argv[2] === 'child') {
server.on('connection', function(socket) {
switch (connected % 6) {
case 0:
child1.send('end', socket, { track: false }); break;
child1.send('end', socket); break;
case 1:
child1.send('write', socket, { track: true }); break;
child1.send('write', socket); break;
case 2:
child2.send('end', socket, { track: true }); break;
child2.send('end', socket); break;
case 3:
child2.send('write', socket, { track: false }); break;
child2.send('write', socket); break;
case 4:
child3.send('end', socket, { track: false }); break;
child3.send('end', socket); break;
case 5:
child3.send('write', socket, { track: false }); break;
child3.send('write', socket); break;
}
connected += 1;

Expand Down

0 comments on commit 980395a

Please sign in to comment.