summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-06-16 22:50:22 +0000
committerisaacs <i@izs.me>2012-06-16 16:26:22 -0700
commitd614d161c7f1ac340251271e911cd4752c158d38 (patch)
treef438b48195aba7674754449816edb36b87b2db42 /test
parent41421ff9da1288aa241a5e9dcf915b685ade1c23 (diff)
downloadnodejs-d614d161c7f1ac340251271e911cd4752c158d38.tar.gz
nodejs-d614d161c7f1ac340251271e911cd4752c158d38.tar.bz2
nodejs-d614d161c7f1ac340251271e911cd4752c158d38.zip
test: Don't reuse common.PORT in test-child-process-fork-net
This fixes #3447
Diffstat (limited to 'test')
-rw-r--r--test/simple/test-child-process-fork-net.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/simple/test-child-process-fork-net.js b/test/simple/test-child-process-fork-net.js
index 6dd0e5fde..39b22d2ab 100644
--- a/test/simple/test-child-process-fork-net.js
+++ b/test/simple/test-child-process-fork-net.js
@@ -157,8 +157,15 @@ if (process.argv[2] === 'child') {
console.log('PARENT: server closed');
callback();
});
- server.listen(common.PORT, function() {
- var connect = net.connect(common.PORT);
+ // don't listen on the same port, because SmartOS sometimes says
+ // that the server's fd is closed, but it still cannot listen
+ // on the same port again.
+ //
+ // An isolated test for this would be lovely, but for now, this
+ // will have to do.
+ server.listen(common.PORT + 1, function() {
+ console.error('testSocket, listening');
+ var connect = net.connect(common.PORT + 1);
var store = '';
connect.on('data', function(chunk) {
store += chunk;