From 8def0379b73cb993fbf4bb92618cf1db0a7dedff Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 10 Oct 2018 13:06:11 -0700 Subject: [PATCH] test: rename common.ddCommand() Change common.ddCommand() to common.createZeroFilledFile(). Backport-PR-URL: https://github.com/nodejs/node/pull/23630 PR-URL: https://github.com/nodejs/node/pull/23411 Reviewed-By: Refael Ackermann Reviewed-By: Richard Lau Reviewed-By: Luigi Pinca Reviewed-By: Benjamin Gruenbaum Reviewed-By: Sakthipriyan Vairamani Reviewed-By: James M Snell Reviewed-By: George Adams --- test/common/README.md | 2 +- test/common/index.js | 4 ++-- test/common/index.mjs | 4 ++-- test/parallel/test-http-chunk-problem.js | 2 +- test/parallel/test-pipe-file-to-http.js | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/common/README.md b/test/common/README.md index 4d914f4f89e5ad..e63c83fd806dfb 100644 --- a/test/common/README.md +++ b/test/common/README.md @@ -52,7 +52,7 @@ symlinks ([SeCreateSymbolicLinkPrivilege](https://msdn.microsoft.com/en-us/library/windows/desktop/bb530716(v=vs.85).aspx)). On non-Windows platforms, this always returns `true`. -### ddCommand(filename) +### createZeroFilledFile(filename) Creates a 10 MB file of all null characters. diff --git a/test/common/index.js b/test/common/index.js index cc1548a22a9e1a..66e1b880b6e00d 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -173,7 +173,7 @@ function childShouldThrowAndAbort() { }); } -function ddCommand(filename) { +function createZeroFilledFile(filename) { const fd = fs.openSync(filename, 'w'); fs.ftruncateSync(fd, 10 * 1024 * 1024); fs.closeSync(fd); @@ -696,7 +696,7 @@ module.exports = { busyLoop, canCreateSymLink, childShouldThrowAndAbort, - ddCommand, + createZeroFilledFile, disableCrashOnUnhandledRejection, enoughTestCpu, enoughTestMem, diff --git a/test/common/index.mjs b/test/common/index.mjs index 832f68a9ee0d3e..bb17d9d37171a6 100644 --- a/test/common/index.mjs +++ b/test/common/index.mjs @@ -22,7 +22,7 @@ const { PIPE, hasIPv6, childShouldThrowAndAbort, - ddCommand, + createZeroFilledFile, platformTimeout, allowGlobals, mustCall, @@ -71,7 +71,7 @@ export { PIPE, hasIPv6, childShouldThrowAndAbort, - ddCommand, + createZeroFilledFile, platformTimeout, allowGlobals, mustCall, diff --git a/test/parallel/test-http-chunk-problem.js b/test/parallel/test-http-chunk-problem.js index dcc3a9c3fc8eed..c2502a891d325c 100644 --- a/test/parallel/test-http-chunk-problem.js +++ b/test/parallel/test-http-chunk-problem.js @@ -63,7 +63,7 @@ function executeRequest(cb) { tmpdir.refresh(); -common.ddCommand(filename); +common.createZeroFilledFile(filename); server = http.createServer(function(req, res) { res.writeHead(200); diff --git a/test/parallel/test-pipe-file-to-http.js b/test/parallel/test-pipe-file-to-http.js index 70805873f1988e..3cadec7a27237e 100644 --- a/test/parallel/test-pipe-file-to-http.js +++ b/test/parallel/test-pipe-file-to-http.js @@ -56,7 +56,7 @@ const server = http.createServer(function(req, res) { server.listen(0); server.on('listening', function() { - common.ddCommand(filename); + common.createZeroFilledFile(filename); makeRequest(); });