diff options
author | coreybeaumont <coreybeaumont@gmail.com> | 2017-04-22 13:22:57 -0700 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2017-04-28 14:33:14 -0700 |
commit | 0101a8f1a6eb363e1ae5ac7aca19223e37025f78 (patch) | |
tree | 9f236691f4a556cab5cccb426dae08809a6004fb /test | |
parent | 1052383f7ce4d151bdcc3e71f522c5f5b430bff6 (diff) | |
download | android-node-v8-0101a8f1a6eb363e1ae5ac7aca19223e37025f78.tar.gz android-node-v8-0101a8f1a6eb363e1ae5ac7aca19223e37025f78.tar.bz2 android-node-v8-0101a8f1a6eb363e1ae5ac7aca19223e37025f78.zip |
test: add relative path to accommodate limit
Found that libuv had a path character limit of 108.
Used path.relative() to set prefix with relative path.
Also added comments explaining the use of a relative path.
PR-URL: https://github.com/nodejs/node/pull/12601
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-net-connect-options-fd.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/parallel/test-net-connect-options-fd.js b/test/parallel/test-net-connect-options-fd.js index 5a0db83184..9cc581243f 100644 --- a/test/parallel/test-net-connect-options-fd.js +++ b/test/parallel/test-net-connect-options-fd.js @@ -2,6 +2,7 @@ const common = require('../common'); const assert = require('assert'); const net = require('net'); +const path = require('path'); const Pipe = process.binding('pipe_wrap').Pipe; if (common.isWindows) { @@ -32,7 +33,9 @@ const forAllClients = (cb) => common.mustCall(cb, CLIENT_VARIANTS); // Test Pipe fd is wrapped correctly { - const prefix = `${common.PIPE}-net-connect-options-fd`; + // Use relative path to avoid hitting 108-char length limit + // for socket paths in libuv. + const prefix = path.relative('.', `${common.PIPE}-net-connect-options-fd`); const serverPath = `${prefix}-server`; let counter = 0; let socketCounter = 0; |