From 85827bde344340daa7777f84db01a5a6fb8caede Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 29 Nov 2010 14:21:30 -0800 Subject: [PATCH] Avoid cascading EADDRINUSE test failure See note in test-securepair-client.js --- test/simple/test-securepair-client.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/simple/test-securepair-client.js b/test/simple/test-securepair-client.js index db9fd55023..bb5eeac68c 100644 --- a/test/simple/test-securepair-client.js +++ b/test/simple/test-securepair-client.js @@ -6,6 +6,12 @@ var fs = require('fs'); var crypto = require('crypto'); var spawn = require('child_process').spawn; +// FIXME: Avoid the common PORT as this test currently hits a C-level +// assertion error with node_g. The program aborts without HUPing +// the openssl s_server thus causing many tests to fail with +// EADDRINUSE. +var PORT = common.PORT + 5; + var connections = 0; var keyfn = join(common.fixturesDir, "agent.key"); @@ -15,7 +21,7 @@ var certfn = join(common.fixturesDir, "agent.crt"); var cert = fs.readFileSync(certfn).toString(); var server = spawn('openssl', ['s_server', - '-accept', common.PORT, + '-accept', PORT, '-cert', certfn, '-key', keyfn]); server.stdout.pipe(process.stdout); @@ -77,7 +83,7 @@ function startClient () { pair.encrypted.pipe(s); s.pipe(pair.encrypted); - s.connect(common.PORT); + s.connect(PORT); s.on('connect', function () { console.log("client connected");