summaryrefslogtreecommitdiff
path: root/test/parallel/test-tls-max-send-fragment.js
diff options
context:
space:
mode:
authorBrian White <mscdex@mscdex.net>2016-05-29 03:06:56 -0400
committerEvan Lucas <evanlucas@me.com>2016-06-15 18:12:31 -0500
commiteded11705b30b8e07df3f17af2661ebf0fc8ec6b (patch)
treef435a43645c4095a92add479a6b31e7621836e26 /test/parallel/test-tls-max-send-fragment.js
parent27ed7fc56c24cac8bc2622a39e8902a888d984e5 (diff)
downloadnode-new-eded11705b30b8e07df3f17af2661ebf0fc8ec6b.tar.gz
test: use random ports where possible
This helps to prevent issues where a failed test can keep a bound socket open long enough to cause other tests to fail with EADDRINUSE because the same port number is used. PR-URL: https://github.com/nodejs/node/pull/7045 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
Diffstat (limited to 'test/parallel/test-tls-max-send-fragment.js')
-rw-r--r--test/parallel/test-tls-max-send-fragment.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-tls-max-send-fragment.js b/test/parallel/test-tls-max-send-fragment.js
index ba609a7ee9..6cb8e5f6cf 100644
--- a/test/parallel/test-tls-max-send-fragment.js
+++ b/test/parallel/test-tls-max-send-fragment.js
@@ -27,8 +27,8 @@ var server = tls.createServer({
assert(c.setMaxSendFragment(maxChunk));
c.end(buf);
-}).listen(common.PORT, function() {
- var c = tls.connect(common.PORT, {
+}).listen(0, function() {
+ var c = tls.connect(this.address().port, {
rejectUnauthorized: false
}, function() {
c.on('data', function(chunk) {