Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
  • Loading branch information
bnoordhuis committed Jan 20, 2018
commit fefb2407eb6cd35726dac332ed2a5e54cb900851
1 change: 1 addition & 0 deletions test/parallel/test-cluster-net-listen-relative-path.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ assert.strictEqual(path.resolve(socketDir, socketName).length > 100, true,

if (cluster.isMaster) {
// ensure that the worker exits peacefully
common.refreshTmpDir();
process.chdir(common.tmpDir);
fs.mkdirSync(socketDir);
cluster.fork().on('exit', common.mustCall(function(statusCode) {
Expand Down