From dacc7ebabb4c17b8f0dbd5a6543df094462234de Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Fri, 20 Oct 2017 15:24:58 +0100 Subject: [PATCH] exit if mock servers fail to start --- .../test/acceptance/coffee/helpers/MockDocStoreApi.coffee | 3 +++ .../test/acceptance/coffee/helpers/MockDocUpdaterApi.coffee | 4 ++++ .../test/acceptance/coffee/helpers/MockWebApi.coffee | 3 +++ 3 files changed, 10 insertions(+) diff --git a/services/track-changes/test/acceptance/coffee/helpers/MockDocStoreApi.coffee b/services/track-changes/test/acceptance/coffee/helpers/MockDocStoreApi.coffee index 29864479a4..0a0ddc72e3 100644 --- a/services/track-changes/test/acceptance/coffee/helpers/MockDocStoreApi.coffee +++ b/services/track-changes/test/acceptance/coffee/helpers/MockDocStoreApi.coffee @@ -19,6 +19,9 @@ module.exports = MockDocUpdaterApi = app.listen 3016, (error) -> throw error if error? + .on "error", (error) -> + console.error "error starting MockDocStoreApi:", error.message + process.exit(1) MockDocUpdaterApi.run() diff --git a/services/track-changes/test/acceptance/coffee/helpers/MockDocUpdaterApi.coffee b/services/track-changes/test/acceptance/coffee/helpers/MockDocUpdaterApi.coffee index 5ef3506b9c..2c87fde358 100644 --- a/services/track-changes/test/acceptance/coffee/helpers/MockDocUpdaterApi.coffee +++ b/services/track-changes/test/acceptance/coffee/helpers/MockDocUpdaterApi.coffee @@ -31,6 +31,10 @@ module.exports = MockDocUpdaterApi = app.listen 3003, (error) -> throw error if error? + .on "error", (error) -> + console.error "error starting MockDocUpdaterApi:", error.message + process.exit(1) + MockDocUpdaterApi.run() diff --git a/services/track-changes/test/acceptance/coffee/helpers/MockWebApi.coffee b/services/track-changes/test/acceptance/coffee/helpers/MockWebApi.coffee index 7beb67075e..97b4ea33ca 100644 --- a/services/track-changes/test/acceptance/coffee/helpers/MockWebApi.coffee +++ b/services/track-changes/test/acceptance/coffee/helpers/MockWebApi.coffee @@ -33,6 +33,9 @@ module.exports = MockWebApi = app.listen 3000, (error) -> throw error if error? + .on "error", (error) -> + console.error "error starting MockWebApiServer:", error.message + process.exit(1) MockWebApi.run()