Skip to content

Commit

Permalink
Remove test to reproduce race condition error
Browse files Browse the repository at this point in the history
We'll bring it back in a new PR
  • Loading branch information
aurelien-reeves committed Mar 16, 2021
1 parent 36666d3 commit 2e744ae
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
2 changes: 0 additions & 2 deletions features/support/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ Before('@global-install', function (this: World) {

After(async function (this: World) {
if (this.reportServer?.started) {
// TODO: remove temporary debug
console.error('Stopping fake server')
await this.reportServer.stop()
}

Expand Down
28 changes: 0 additions & 28 deletions src/formatter/http_stream_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,32 +159,4 @@ describe('HttpStream', () => {
stream.write('hello')
stream.end()
})

for (let i = 0; i < 1000; i++) {
it(`runs race condition test ${i}`, (callback) => {
const stream = new HttpStream(
`http://localhost:${port}/api/reports`,
'GET',
{}
)

const readerStream = new Writable({
objectMode: true,
write: function (responseBody: string, encoding, writeCallback) {
writeCallback()
},
})

stream.pipe(readerStream)
readerStream.on('error', callback)
readerStream.on('finish', () => {
reportServer
.stop()
.then(() => callback())
.catch(callback)
})
stream.write('hello')
stream.end()
})
}
})

0 comments on commit 2e744ae

Please sign in to comment.