test: use port number from env in tls socket test
authorStefan Budeanu <stefan@budeanu.com>
Wed, 28 Oct 2015 02:52:15 +0000 (22:52 -0400)
committerJames M Snell <jasnell@gmail.com>
Thu, 29 Oct 2015 19:40:23 +0000 (12:40 -0700)
Tests normally use common.PORT to allow the user to select which port
number to listen on. Hardcoding the port number will cause parallel
instances of the test to fail.

PR-URL: https://github.com/nodejs/node/pull/3557
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
test/parallel/test-tls-async-cb-after-socket-end.js

index 87258cb..ea40205 100644 (file)
@@ -36,9 +36,9 @@ server.on('resumeSession', function(id, cb) {
   next();
 });
 
-server.listen(1443, function() {
+server.listen(common.PORT, function() {
   var clientOpts = {
-    port: 1443,
+    port: common.PORT,
     rejectUnauthorized: false,
     session: false
   };