Skip to content

Commit

Permalink
chore: test to see if #19986 really solved #19422.
Browse files Browse the repository at this point in the history
Runs that flake 100 times instead of just once.
  • Loading branch information
ckerr committed Aug 28, 2019
1 parent 04debd5 commit d2d08b1
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions spec/chromium-spec.js
Expand Up @@ -59,27 +59,29 @@ describe('chromium feature', () => {
})

describe('--remote-debugging-port switch', () => {
it('should display the discovery page', (done) => {
const electronPath = remote.getGlobal('process').execPath
let output = ''
const appProcess = ChildProcess.spawn(electronPath, [`--remote-debugging-port=`])

appProcess.stderr.on('data', (data) => {
output += data
const m = /DevTools listening on ws:\/\/127.0.0.1:(\d+)\//.exec(output)
if (m) {
appProcess.stderr.removeAllListeners('data')
const port = m[1]
http.get(`http://127.0.0.1:${port}`, (res) => {
res.destroy()
appProcess.kill()
expect(res.statusCode).to.eql(200)
expect(parseInt(res.headers['content-length'])).to.be.greaterThan(0)
done()
})
}
for (let i = 0; i < 100; ++i) {
it('should display the discovery page', (done) => {
const electronPath = remote.getGlobal('process').execPath
let output = ''
const appProcess = ChildProcess.spawn(electronPath, [`--remote-debugging-port=`])

appProcess.stderr.on('data', (data) => {
output += data
const m = /DevTools listening on ws:\/\/127.0.0.1:(\d+)\//.exec(output)
if (m) {
appProcess.stderr.removeAllListeners('data')
const port = m[1]
http.get(`http://127.0.0.1:${port}`, (res) => {
res.destroy()
appProcess.kill()
expect(res.statusCode).to.eql(200)
expect(parseInt(res.headers['content-length'])).to.be.greaterThan(0)
done()
})
}
})
})
})
}
})
})

Expand Down

0 comments on commit d2d08b1

Please sign in to comment.