mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
test: fix test-cluster-net-listen-relative-path.js to run in /
test-cluster-net-listen-relative-path fails if run from the root directory on POSIX because the socket filename isn't quite long enough. Increase it by 2 so that the path length always exceeds 100 characters. PR-URL: https://github.com/nodejs/node/pull/34820 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
This commit is contained in:
committed by
Anna Henningsen
parent
cc98103802
commit
d016cdcaa9
@@ -17,7 +17,7 @@ const tmpdir = require('../common/tmpdir');
|
||||
|
||||
// Choose a socket name such that the absolute path would exceed 100 bytes.
|
||||
const socketDir = './unix-socket-dir';
|
||||
const socketName = 'A'.repeat(100 - socketDir.length - 1);
|
||||
const socketName = 'A'.repeat(101 - socketDir.length);
|
||||
|
||||
// Make sure we're not in a weird environment.
|
||||
assert.ok(path.resolve(socketDir, socketName).length > 100,
|
||||
|
||||
Reference in New Issue
Block a user