From f8f2b476a1bc05c7fb91172d156788d51e5af150 Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Tue, 17 Dec 2024 14:10:43 +0100 Subject: [PATCH] added RETRY_COUNT environment variable (#35318) * added RETRY_COUNT environment variable fixes: #35225 Signed-off-by: Erik Jan de Wit * Update js/apps/admin-ui/cypress.config.ts Co-authored-by: Stian Thorgersen Signed-off-by: Erik Jan de Wit --------- Signed-off-by: Erik Jan de Wit Signed-off-by: Erik Jan de Wit Co-authored-by: Stian Thorgersen --- .github/workflows/js-ci.yml | 1 + js/apps/account-ui/playwright.config.ts | 4 +++- js/apps/admin-ui/cypress.config.ts | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/js-ci.yml b/.github/workflows/js-ci.yml index 9753fe779a2..415fcdab895 100644 --- a/.github/workflows/js-ci.yml +++ b/.github/workflows/js-ci.yml @@ -11,6 +11,7 @@ on: env: MAVEN_ARGS: "-B -nsu -Daether.connector.http.connectionMaxTtl=25" + RETRY_COUNT: 3 concurrency: # Only cancel jobs for PR updates diff --git a/js/apps/account-ui/playwright.config.ts b/js/apps/account-ui/playwright.config.ts index 8580ab472ad..b6d8e2308bb 100644 --- a/js/apps/account-ui/playwright.config.ts +++ b/js/apps/account-ui/playwright.config.ts @@ -2,6 +2,8 @@ import { defineConfig, devices } from "@playwright/test"; import { getAccountUrl } from "./test/utils"; +const retryCount = parseInt(process.env.RETRY_COUNT || "0"); + /** * See https://playwright.dev/docs/test-configuration. */ @@ -9,7 +11,7 @@ export default defineConfig({ testDir: "./test", fullyParallel: true, forbidOnly: !!process.env.CI, - retries: process.env.CI ? 2 : 0, + retries: retryCount, workers: 1, reporter: process.env.CI ? [["github"], ["html"]] : "list", expect: { diff --git a/js/apps/admin-ui/cypress.config.ts b/js/apps/admin-ui/cypress.config.ts index 31fd952fe4d..bb8452c28ee 100644 --- a/js/apps/admin-ui/cypress.config.ts +++ b/js/apps/admin-ui/cypress.config.ts @@ -4,6 +4,7 @@ import fs from "node:fs"; import { isAsyncFunction } from "node:util/types"; const isCI = process.env.CI === "true"; +const retryCount = parseInt(process.env.RETRY_COUNT || "0"); export default defineConfig({ video: isCI, @@ -16,7 +17,7 @@ export default defineConfig({ experimentalMemoryManagement: true, retries: { - runMode: 3, + runMode: retryCount, }, e2e: {