diff --git a/lib/internal/fs/promises.js b/lib/internal/fs/promises.js index aa927a3dff575d..125e27545cb567 100644 --- a/lib/internal/fs/promises.js +++ b/lib/internal/fs/promises.js @@ -6,7 +6,7 @@ const kIoMaxLength = 2 ** 31 - 1; const kReadFileBufferLength = 512 * 1024; const kReadFileUnknownBufferLength = 64 * 1024; -const kWriteFileMaxChunkSize = 2 ** 14; +const kWriteFileMaxChunkSize = 512 * 1024; const { ArrayPrototypePush, diff --git a/test/parallel/test-fs-promises-file-handle-writeFile.js b/test/parallel/test-fs-promises-file-handle-writeFile.js index bd90a79149b5f1..7ad1beb4bcdd7b 100644 --- a/test/parallel/test-fs-promises-file-handle-writeFile.js +++ b/test/parallel/test-fs-promises-file-handle-writeFile.js @@ -30,7 +30,7 @@ async function validateWriteFile() { async function doWriteAndCancel() { const filePathForHandle = path.resolve(tmpDir, 'dogs-running.txt'); const fileHandle = await open(filePathForHandle, 'w+'); - const buffer = Buffer.from('dogs running'.repeat(10000), 'utf8'); + const buffer = Buffer.from('dogs running'.repeat(512 * 1024), 'utf8'); const controller = new AbortController(); const { signal } = controller; process.nextTick(() => controller.abort());