Skip to content

Commit

Permalink
test: rename common.ddCommand()
Browse files Browse the repository at this point in the history
Change common.ddCommand() to common.createZeroFilledFile().

Backport-PR-URL: #23630
PR-URL: #23411
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: George Adams <[email protected]>
  • Loading branch information
Trott authored and MylesBorins committed Nov 29, 2018
1 parent 1cdfd1a commit 9003c74
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion test/common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -696,7 +696,7 @@ module.exports = {
busyLoop,
canCreateSymLink,
childShouldThrowAndAbort,
ddCommand,
createZeroFilledFile,
disableCrashOnUnhandledRejection,
enoughTestCpu,
enoughTestMem,
Expand Down
4 changes: 2 additions & 2 deletions test/common/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const {
PIPE,
hasIPv6,
childShouldThrowAndAbort,
ddCommand,
createZeroFilledFile,
platformTimeout,
allowGlobals,
mustCall,
Expand Down Expand Up @@ -71,7 +71,7 @@ export {
PIPE,
hasIPv6,
childShouldThrowAndAbort,
ddCommand,
createZeroFilledFile,
platformTimeout,
allowGlobals,
mustCall,
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-http-chunk-problem.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function executeRequest(cb) {

tmpdir.refresh();

common.ddCommand(filename);
common.createZeroFilledFile(filename);

server = http.createServer(function(req, res) {
res.writeHead(200);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-pipe-file-to-http.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});

Expand Down

0 comments on commit 9003c74

Please sign in to comment.