summaryrefslogtreecommitdiff
path: root/test/parallel/test-http-pipe-fs.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2015-06-09 11:40:55 -0700
committerRich Trott <rtrott@gmail.com>2015-06-13 22:27:17 -0700
commit7c79490bfbfee3868c1524207fcd11e0149b9c73 (patch)
tree2b93b80b6921c0f81d36efcd51c2524d875c6669 /test/parallel/test-http-pipe-fs.js
parent88d7904c0ba66bd2ced87f674d3f6ee098db970c (diff)
downloadandroid-node-v8-7c79490bfbfee3868c1524207fcd11e0149b9c73.tar.gz
android-node-v8-7c79490bfbfee3868c1524207fcd11e0149b9c73.tar.bz2
android-node-v8-7c79490bfbfee3868c1524207fcd11e0149b9c73.zip
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-http-pipe-fs.js')
-rw-r--r--test/parallel/test-http-pipe-fs.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/parallel/test-http-pipe-fs.js b/test/parallel/test-http-pipe-fs.js
index bfee9ce23f..a5428d2b6b 100644
--- a/test/parallel/test-http-pipe-fs.js
+++ b/test/parallel/test-http-pipe-fs.js
@@ -5,6 +5,8 @@ var http = require('http');
var fs = require('fs');
var path = require('path');
+common.refreshTmpDir();
+
var file = path.join(common.tmpDir, 'http-pipe-fs-test.txt');
var requests = 0;