We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3439582 commit be91f0aCopy full SHA for be91f0a
1 file changed
test/parallel/test-net-pipe-connect-errors.js
@@ -24,6 +24,7 @@ const common = require('../common');
24
const fixtures = require('../common/fixtures');
25
const fs = require('fs');
26
const net = require('net');
27
+const path = require('path');
28
const assert = require('assert');
29
30
// Test if ENOTSOCK is fired when trying to connect to a file which is not
@@ -38,11 +39,11 @@ if (common.isWindows) {
38
39
} else {
40
const tmpdir = require('../common/tmpdir');
41
tmpdir.refresh();
- // Keep the file name very short so that we don't exceed the 108 char limit
42
- // on CI for a POSIX socket. Even though this isn't actually a socket file,
43
- // the error will be different from the one we are expecting if we exceed the
44
- // limit.
45
- emptyTxt = `${tmpdir.path}0.txt`;
+ // Use a short relative path so that we don't exceed the 108 byte limit for
+ // Unix socket paths in long or multibyte CI workspaces. Even though this
+ // isn't actually a socket file, the error will be different from the one we
+ // are expecting if the path is too long.
46
+ emptyTxt = path.join(path.relative(process.cwd(), tmpdir.path), '0.txt');
47
48
function cleanup() {
49
try {
0 commit comments