Merge pull request #3472 from overleaf/jpa-fix-flaky-assertion

[HealthCheckControllerTests] harden assertion on timed-out http requests

GitOrigin-RevId: f6e8346b2f9744e7f4d11b8ac6164c236d3d7e74
This commit is contained in:
Jakob Ackermann 2020-12-09 10:28:32 +00:00 committed by Copybot
parent cb9d207ba0
commit dc576baa05

View file

@ -54,7 +54,7 @@ describe('HealthCheckController', function() {
json: true
})
} catch (err) {
expect(err.code).to.equal('ESOCKETTIMEDOUT')
expect(err.code).to.be.oneOf(['ETIMEDOUT', 'ESOCKETTIMEDOUT'])
return
}
expect.fail('expected request to fail with timeout error')