Skip to content

Commit 0101a8f

Browse files
coreybeaumontTrott
coreybeaumont
authored andcommitted
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: #12601 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]>
1 parent 1052383 commit 0101a8f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/parallel/test-net-connect-options-fd.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
const common = require('../common');
33
const assert = require('assert');
44
const net = require('net');
5+
const path = require('path');
56
const Pipe = process.binding('pipe_wrap').Pipe;
67

78
if (common.isWindows) {
@@ -32,7 +33,9 @@ const forAllClients = (cb) => common.mustCall(cb, CLIENT_VARIANTS);
3233

3334
// Test Pipe fd is wrapped correctly
3435
{
35-
const prefix = `${common.PIPE}-net-connect-options-fd`;
36+
// Use relative path to avoid hitting 108-char length limit
37+
// for socket paths in libuv.
38+
const prefix = path.relative('.', `${common.PIPE}-net-connect-options-fd`);
3639
const serverPath = `${prefix}-server`;
3740
let counter = 0;
3841
let socketCounter = 0;

0 commit comments

Comments
 (0)