Skip to content

Commit

Permalink
Fixed big flaky test (#1371)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollina committed Mar 17, 2022
1 parent da6b1dc commit 79b2a8e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/transport/big.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const stream = require('stream')

const pipeline = promisify(stream.pipeline)
const { Writable } = stream
const sleep = promisify(setTimeout)

test('eight million lines', async ({ equal, comment }) => {
const destination = join(
Expand All @@ -21,6 +22,7 @@ test('eight million lines', async ({ equal, comment }) => {
const child = execa(process.argv[0], [join(__dirname, '..', 'fixtures', 'transport-many-lines.js'), destination])

await once(child, 'exit')
await sleep(1000) // wait for the file to be written
const toWrite = 8 * 1000000
let count = 0
await pipeline(createReadStream(destination), split(), new Writable({
Expand Down

0 comments on commit 79b2a8e

Please sign in to comment.