Просмотр исходного кода

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

[HealthCheckControllerTests] harden assertion on timed-out http requests

GitOrigin-RevId: f6e8346b2f9744e7f4d11b8ac6164c236d3d7e74
Jakob Ackermann 5 лет назад
Родитель
Сommit
dc576baa05
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      services/web/test/acceptance/src/HealthCheckControllerTests.js

+ 1 - 1
services/web/test/acceptance/src/HealthCheckControllerTests.js

@@ -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')