Skip to content

Commit

Permalink
test: tmpdir creation failures should fail tests
Browse files Browse the repository at this point in the history
tmpdir creation only happens for tests that need it. So failure to
refresh the temporary directory should result in a failed test.

PR-URL: #1976
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
  • Loading branch information
Trott committed Jun 17, 2015
1 parent c4ec041 commit 88c1831
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,8 @@ function rmdirSync(p, originalEr) {
}

exports.refreshTmpDir = function() {
try {
rimrafSync(exports.tmpDir);
} catch (e) {
}

try {
fs.mkdirSync(exports.tmpDir);
} catch (e) {
}
rimrafSync(exports.tmpDir);
fs.mkdirSync(exports.tmpDir);
};

if (process.env.TEST_THREAD_ID) {
Expand Down

0 comments on commit 88c1831

Please sign in to comment.