Skip to content

Commit

Permalink
Remove unnecessary sleep between test runs
Browse files Browse the repository at this point in the history
The introduction of `sleep` between test runs in `dashboard_spec.js` and `detector_list_spec.js` was initially implemented to handle timing issues. However, these tests were actually failing due to a recent URL change, as detailed in opensearch-project/opensearch-dashboards-functional-test#1257.

With the root cause of the failures addressed, the delays introduced by `sleep` commands are now redundant and can potentially slow down the testing process without providing any benefit. This PR removes these unnecessary sleep intervals between test executions.

**Testing Done:**
- Confirmed that all remote Cypress tests pass without the sleep intervals.

Signed-off-by: Kaituo Li <[email protected]>
  • Loading branch information
kaituo committed Apr 30, 2024
1 parent 0a748c7 commit 945dd67
Showing 1 changed file with 9 additions and 19 deletions.
28 changes: 9 additions & 19 deletions .github/workflows/remote-integ-tests-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- name: Checkout Dashboards Functional Test Repo
uses: actions/checkout@v2
with:
path: opensearch-dashboards-functional-test
repository: opensearch-project/opensearch-dashboards-functional-test
ref: ${{ env.OPENSEARCH_DASHBOARDS_VERSION }}
fetch-depth: 0

- name: Set up JDK
uses: actions/setup-java@v1
with:
Expand Down Expand Up @@ -139,27 +147,9 @@ jobs:
echo "::set-output name=cypress_version::$(cat ./package.json | jq '.dependencies.cypress' | tr -d '"')"
working-directory: opensearch-dashboards-functional-test

- name: Finding spec files and store to output
id: finding-files
run: |
echo "::set-output name=FILELIST::$(find cypress/integration/plugins/anomaly-detection-dashboards-plugin -name '*.js' -print)"
working-directory: opensearch-dashboards-functional-test

- name: Print spec files from output
run: |
IFS="," read -a myarray <<< ${{ steps.finding-files.outputs.FILELIST }}
for i in "${myarray[@]}"; do
echo "${i}"
done
working-directory: opensearch-dashboards-functional-test

- name: Run spec files from output
run: |
IFS="," read -a myarray <<< ${{ steps.finding-files.outputs.FILELIST }}
for i in "${myarray[@]}"; do
yarn cypress:run-without-security --browser electron --spec "${i}"
sleep 60
done
yarn cypress:run-without-security --browser electron --spec cypress/integration/plugins/anomaly-detection-dashboards-plugin/**/*.js
working-directory: opensearch-dashboards-functional-test

- name: Capture failure screenshots
Expand Down

0 comments on commit 945dd67

Please sign in to comment.