From fbccf71aabb87e4d2e2756d573c2871b89f5249c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20J=2E=20G=C3=B6decke?= Date: Fri, 27 Oct 2023 10:12:45 +0200 Subject: [PATCH] add cooldown period --- tests/e2e/config.js | 3 +++ tests/e2e/testRunner.js | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/tests/e2e/config.js b/tests/e2e/config.js index 3b1856ab8ad8..d723682f79c1 100644 --- a/tests/e2e/config.js +++ b/tests/e2e/config.js @@ -46,6 +46,9 @@ module.exports = { // The time in milliseconds after which an operation fails due to timeout INTERACTION_TIMEOUT: 300000, + // Period we wait between each test runs, to let the device cool down + COOL_DOWN: 90 * 1000, + TEST_NAMES, /** diff --git a/tests/e2e/testRunner.js b/tests/e2e/testRunner.js index 5c6c33bdf7e9..9bdbdfe8efe8 100644 --- a/tests/e2e/testRunner.js +++ b/tests/e2e/testRunner.js @@ -250,6 +250,15 @@ const runTests = async () => { } } testLog.done(); + + // If we still have tests add a cool down period + if (testIndex < numOfTests - 1) { + const coolDownLogs = Logger.progressInfo(`Cooling down for ${config.COOL_DOWN / 1000}s`); + coolDownLogs.updateText(`Cooling down for ${config.COOL_DOWN / 1000}s`); + // eslint-disable-next-line no-loop-func + await new Promise((resolve) => setTimeout(resolve, config.COOL_DOWN)); + coolDownLogs.done(); + } } // Calculate statistics and write them to our work file