Skip to content

Commit 85827bd

Browse files
committed
Avoid cascading EADDRINUSE test failure
See note in test-securepair-client.js
1 parent 6057747 commit 85827bd

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/simple/test-securepair-client.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ var fs = require('fs');
66
var crypto = require('crypto');
77
var spawn = require('child_process').spawn;
88

9+
// FIXME: Avoid the common PORT as this test currently hits a C-level
10+
// assertion error with node_g. The program aborts without HUPing
11+
// the openssl s_server thus causing many tests to fail with
12+
// EADDRINUSE.
13+
var PORT = common.PORT + 5;
14+
915
var connections = 0;
1016

1117
var keyfn = join(common.fixturesDir, "agent.key");
@@ -15,7 +21,7 @@ var certfn = join(common.fixturesDir, "agent.crt");
1521
var cert = fs.readFileSync(certfn).toString();
1622

1723
var server = spawn('openssl', ['s_server',
18-
'-accept', common.PORT,
24+
'-accept', PORT,
1925
'-cert', certfn,
2026
'-key', keyfn]);
2127
server.stdout.pipe(process.stdout);
@@ -77,7 +83,7 @@ function startClient () {
7783
pair.encrypted.pipe(s);
7884
s.pipe(pair.encrypted);
7985

80-
s.connect(common.PORT);
86+
s.connect(PORT);
8187

8288
s.on('connect', function () {
8389
console.log("client connected");

0 commit comments

Comments
 (0)