diff options
author | Rich Trott <rtrott@gmail.com> | 2015-06-09 11:40:55 -0700 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2015-06-13 22:27:17 -0700 |
commit | 7c79490bfbfee3868c1524207fcd11e0149b9c73 (patch) | |
tree | 2b93b80b6921c0f81d36efcd51c2524d875c6669 /test/parallel/test-fs-sir-writes-alot.js | |
parent | 88d7904c0ba66bd2ced87f674d3f6ee098db970c (diff) | |
download | node-new-7c79490bfbfee3868c1524207fcd11e0149b9c73.tar.gz |
test: only refresh tmpDir for tests that need it
Expose `common.refreshTmpDir()` and only call it
for tests that use common.tmpDir or common.PIPE.
A positive side effect is the removal of a code
smell where child processes were detected by the
presence of `.send()`. Now each process can decide
for itself if it needs to refresh tmpDir.
PR-URL: https://github.com/nodejs/io.js/pull/1954
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Diffstat (limited to 'test/parallel/test-fs-sir-writes-alot.js')
-rw-r--r-- | test/parallel/test-fs-sir-writes-alot.js | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/test/parallel/test-fs-sir-writes-alot.js b/test/parallel/test-fs-sir-writes-alot.js index 537e94b0ac..1f949ed92a 100644 --- a/test/parallel/test-fs-sir-writes-alot.js +++ b/test/parallel/test-fs-sir-writes-alot.js @@ -6,11 +6,7 @@ var join = require('path').join; var filename = join(common.tmpDir, 'out.txt'); -try { - fs.unlinkSync(filename); -} catch (e) { - // might not exist, that's okay. -} +common.refreshTmpDir(); var fd = fs.openSync(filename, 'w'); |