Skip to content

Commit cc80914

Browse files
bnoordhuisMylesBorins
authored andcommitted
test: fix flaky cluster unix socket test
Ensure `common.tmpDir` exists before trying to chdir into it. Fixes a "ENOENT: no such file or directory, uv_chdir" error when the temporary directory is removed before running the test. PR-URL: #17407 Reviewed-By: Richard Lau <[email protected]>
1 parent 19abee1 commit cc80914

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/parallel/test-cluster-net-listen-relative-path.js

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ assert.strictEqual(path.resolve(socketDir, socketName).length > 100, true,
2020

2121
if (cluster.isMaster) {
2222
// ensure that the worker exits peacefully
23+
common.refreshTmpDir();
2324
process.chdir(common.tmpDir);
2425
fs.mkdirSync(socketDir);
2526
cluster.fork().on('exit', common.mustCall(function(statusCode) {

0 commit comments

Comments
 (0)