Skip to content

Commit

Permalink
Fix flaky test in CITGM (#1826)
Browse files Browse the repository at this point in the history
Signed-off-by: Matteo Collina <[email protected]>
  • Loading branch information
mcollina authored Oct 5, 2023
1 parent 90c4cb9 commit bdaf6ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion test/fixtures/transport-worker.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
'use strict'

const { Writable } = require('stream')
const fs = require('fs')
module.exports = (options) => {
const myTransportStream = new Writable({
autoDestroy: true,
write (chunk, enc, cb) {
console.log(chunk.toString())
// Bypass console.log() to avoid flakyness
fs.writeSync(1, chunk.toString())
cb()
}
})
Expand Down
1 change: 0 additions & 1 deletion test/transport/core.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,6 @@ test('stdout in worker', async ({ not }) => {
for await (const chunk of child.stdout) {
actual += chunk
}
await immediate()
not(strip(actual).match(/Hello/), null)
})

Expand Down

0 comments on commit bdaf6ce

Please sign in to comment.