From 1b386a38cdb02b2fe2494294857676dea9504d17 Mon Sep 17 00:00:00 2001 From: sanand Date: Mon, 7 Oct 2024 12:32:22 +0530 Subject: [PATCH 1/2] add task kill for windows --- .github/workflows/~reusable_e2e_by_OS.yaml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/~reusable_e2e_by_OS.yaml b/.github/workflows/~reusable_e2e_by_OS.yaml index f2dffe749..bd31f11a5 100644 --- a/.github/workflows/~reusable_e2e_by_OS.yaml +++ b/.github/workflows/~reusable_e2e_by_OS.yaml @@ -143,7 +143,7 @@ jobs: env: TS: 0 run: | - echo "Starting e2e tests with a 10-minute timeout" + echo "Starting e2e tests with a 90-minute timeout" cd packages/flex-plugin-e2e-tests for i in 1 2; do # Retry logic, retry 3 times timeout 90m npm run start && break || echo "E2E tests timed out, retrying ($i/3)..." @@ -153,7 +153,7 @@ jobs: env: TS: 0 run: | - echo "Starting e2e tests with a 10-minute timeout" + echo "Starting e2e tests with a 90-minute timeout" cd packages/flex-plugin-e2e-tests for i in 1 2; do # Retry logic, retry 3 times gtimeout 90m npm run start && break || echo "E2E tests timed out, retrying ($i/3)..." @@ -163,7 +163,7 @@ jobs: env: TS: 0 run: | - echo "Starting e2e tests with a 10-minute timeout" + echo "Starting e2e tests with a 90-minute timeout" $attempts = 2 $timeout = 5400000 # 90 minutes in milliseconds cd packages/flex-plugin-e2e-tests @@ -195,7 +195,7 @@ jobs: env: TS: 1 run: | - echo "Starting e2e tests with a 10-minute timeout" + echo "Starting e2e tests with a 90-minute timeout" cd packages/flex-plugin-e2e-tests for i in 1 2; do # Retry logic, retry 3 times timeout 90m npm run start && break || echo "E2E tests timed out, retrying ($i/3)..." @@ -205,7 +205,7 @@ jobs: env: TS: 1 run: | - echo "Starting e2e tests with a 10-minute timeout" + echo "Starting e2e tests with a 90-minute timeout" cd packages/flex-plugin-e2e-tests for i in 1 2; do # Retry logic, retry 3 times gtimeout 90m npm run start && break || echo "E2E tests timed out, retrying ($i/3)..." @@ -215,7 +215,7 @@ jobs: env: TS: 1 run: | - echo "Starting e2e tests with a 10-minute timeout" + echo "Starting e2e tests with a 90-minute timeout" $attempts = 2 $timeout = 5400000 # 90 minutes in milliseconds cd packages/flex-plugin-e2e-tests @@ -228,6 +228,7 @@ jobs: } else { echo 'E2E tests timed out. Retrying...' Stop-Process -Id $process.Id + taskkill /f /im node.exe } } catch { echo 'E2E tests failed.' From 7e4ef742456a8a0c54d5cdea6cb71cebe94e0913 Mon Sep 17 00:00:00 2001 From: sanand Date: Mon, 7 Oct 2024 13:04:01 +0530 Subject: [PATCH 2/2] add task kill for windows --- .github/workflows/~reusable_e2e_by_OS.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/~reusable_e2e_by_OS.yaml b/.github/workflows/~reusable_e2e_by_OS.yaml index bd31f11a5..882872a36 100644 --- a/.github/workflows/~reusable_e2e_by_OS.yaml +++ b/.github/workflows/~reusable_e2e_by_OS.yaml @@ -223,8 +223,14 @@ jobs: try { $process = Start-Process -FilePath 'npm' -ArgumentList 'run start' -NoNewWindow -PassThru if ($process.WaitForExit($timeout)) { - echo 'E2E tests completed successfully' - exit 0 + if ($process.ExitCode -eq 0) { + echo 'E2E tests completed successfully' + exit 0 + } else { + echo "E2E tests failed with exit code $($process.ExitCode). Retrying..." + Stop-Process -Id $process.Id + taskkill /f /im node.exe + } } else { echo 'E2E tests timed out. Retrying...' Stop-Process -Id $process.Id