Skip to content

Commit

Permalink
Merge pull request #1094 from dvsa/fix/TimeOut
Browse files Browse the repository at this point in the history
Fix/time out
  • Loading branch information
fibble authored Jan 13, 2025
2 parents 0057887 + 124f835 commit 2d2aaa2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 21 deletions.
1 change: 0 additions & 1 deletion .github/workflows/e2eFullRegression.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jobs:
call-e2etest:
name: Call E2E test workflow
uses: ./.github/workflows/e2etest.yaml
timeout-minutes: ${{ inputs.batch_timeout_minutes }}
with:
platform_env: ${{ inputs.platform_env }}
cucumber_tags: "@FullRegression"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/e2eSelfServeRegression.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jobs:
call-e2etest:
name: Call E2E test workflow
uses: ./.github/workflows/e2etest.yaml
timeout-minutes: ${{ inputs.batch_timeout_minutes }}
with:
platform_env: ${{ inputs.platform_env }}
cucumber_tags: "@ss_regression"
Expand Down
18 changes: 3 additions & 15 deletions .github/workflows/e2etest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,9 @@ jobs:
buildtime=$(date +"%Y%m%d%H%M%S")
echo "job_name=e2e-$buildtime-${{ github.run_id }}" >> $GITHUB_OUTPUT
Calculate-Timeout:
name: Calculate Timeout
runs-on: ubuntu-latest
outputs:
timeout: ${{ steps.set-timeout.outputs.timeout }}
steps:
- name: Set Timeout
id: set-timeout
run: |
echo "timeout=$(( ${{ inputs.batch_timeout_minutes }} + 5 ))" >> $GITHUB_OUTPUT
run-batch:
name: Run Tests on AWS Batch
timeout-minutes: ${{ inputs.Calculate-Timeout.outputs.timeout }}
needs: [create-job-name, Calculate-Timeout]
needs: create-job-name
runs-on: ubuntu-latest
outputs:
job_id: ${{ steps.submit-job.outputs.job_id }}
Expand All @@ -113,7 +101,7 @@ jobs:
--job-name ${{ env.JOB_NAME }} \
--job-queue ${{ env.BATCH_JOB_QUEUE }} \
--job-definition ${{ env.BATCH_JOB_DEFINITION }} \
--timeout "attemptDurationSeconds=$(( ${{ needs.Calculate-Timeout.outputs.timeout }} * 60 ))" \
--timeout "attemptDurationSeconds=$(( ${{ inputs.batch_timeout_minutes }} * 60 ))" \
--container-overrides '{
"command": [
"/bin/sh",
Expand Down Expand Up @@ -157,7 +145,7 @@ jobs:
- name: Wait for Job Completion
env:
JOB_ID: ${{ steps.submit-job.outputs.job_id }}
TIME_OUT: ${{ inputs.Calculate-Timeout.outputs.timeout }}
TIME_OUT: ${{ inputs.batch_timeout_minutes }}
run: |
TIME_OUT=${{ env.TIME_OUT }}
JOB_ID=${{ env.JOB_ID }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,18 @@ public void takeScreenShotAfterFailure(Scenario scenario) {
waitAndClick("Sign out", SelectorType.LINKTEXT);
}
}
if (Browser.isBrowserOpen()) {
Browser.getDriver().quit();
}
}

}

@AfterAll
public static void tearDown() {
if (Browser.isBrowserOpen()) {
Browser.getDriver().quit();
}
Browser.removeLocalDriverThread();
}


public static void attach(Scenario scenarioStatus) {
if (scenarioStatus.isFailed()) {
Allure.addAttachment("Oops something has gone wrong",
Expand Down

0 comments on commit 2d2aaa2

Please sign in to comment.