diff --git a/docker-compose.yml b/docker-compose.yml index d13f8110..30aab56a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -33,6 +33,7 @@ services: - BOPTEST_REDIS_HOST - BOPTEST_REGION - BOPTEST_TIMEOUT + - BOPTEST_MESSAGE_TIMEOUT - BOPTEST_DASHBOARD_SERVER - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY diff --git a/test/test_testcase_api.py b/test/test_testcase_api.py index 561aa5ef..00855d04 100644 --- a/test/test_testcase_api.py +++ b/test/test_testcase_api.py @@ -56,6 +56,9 @@ def test_ibpsa_boptest_testcase(): response = requests.get(f"{host}/name/{testid}") check.equal(response.status_code, 200) + response = requests.post(f"{host}/advance/{testid}") + check.equal(response.status_code, 200) + # Stop the test response = requests.put(f"{host}/stop/{testid}") check.equal(response.status_code, 200) diff --git a/version.txt b/version.txt index 267577d4..2b7c5ae0 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.4.1 +0.4.2 diff --git a/web/server/src/lib/messaging.js b/web/server/src/lib/messaging.js index 63b1eed3..fa318350 100644 --- a/web/server/src/lib/messaging.js +++ b/web/server/src/lib/messaging.js @@ -5,7 +5,11 @@ import { pack, unpack } from 'msgpackr' class Messaging { constructor() { this.subTimeoutTime = 600000 - this.responseTimeoutTime = 480000 + this.responseTimeoutTime = Number( + process.env.BOPTEST_MESSAGE_TIMEOUT + ? process.env.BOPTEST_MESSAGE_TIMEOUT + : "1200000", // Default 20 minute message timeout + ); this.subscriptionTimers = {} this.messageHandlers = {} @@ -39,7 +43,11 @@ class Messaging { this.subscribe(responseChannel) this.sendWorkerMessage(requestChannel, requestID, method, params) responseTimeout = setTimeout(() => { - reject(new Error(`Timeout while sending command '${method}' to testid '${workerID}'`)) + reject( + new Error( + `Timeout for request: '${requestID}', with method:'${method}', sent to testid: '${workerID}'`, + ), + ); }, this.responseTimeoutTime) }) }