| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent c1ac578 commit cc26957
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,7 +13,7 @@ const fs = require('fs'); | |||
| 13 | 13 | const filename = fixtures.path('loop.js'); // Some small non-homogeneous file. | |
| 14 | 14 | const content = fs.readFileSync(filename); | |
| 15 | 15 | ||
| 16 | - const N = 1000; | ||
| 16 | + const N = 2000; | ||
| 17 | 17 | let started = 0; | |
| 18 | 18 | let done = 0; | |
| 19 | 19 | ||
@@ -26,10 +26,10 @@ function startRead() { | |||
| 26 | 26 | .on('data', (chunk) => { | |
| 27 | 27 | chunks.push(chunk); | |
| 28 | 28 | arrayBuffers.add(chunk.buffer); | |
| 29 | - if (started < N) | ||
| 30 | - startRead(); | ||
| 31 | 29 | }) | |
| 32 | 30 | .on('end', common.mustCall(() => { | |
| 31 | + if (started < N) | ||
| 32 | + startRead(); | ||
| 33 | 33 | assert.deepStrictEqual(Buffer.concat(chunks), content); | |
| 34 | 34 | if (++done === N) { | |
| 35 | 35 | const retainedMemory = | |
@@ -43,5 +43,5 @@ function startRead() { | |||
| 43 | 43 | ||
| 44 | 44 | // Don’t start the reads all at once – that way we would have to allocate | |
| 45 | 45 | // a large amount of memory upfront. | |
| 46 | - for (let i = 0; i < 4; ++i) | ||
| 46 | + for (let i = 0; i < 6; ++i) | ||
| 47 | 47 | startRead(); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments