From 89af9b1e271d6817ca3e620eb74b3e3fe1cc4a01 Mon Sep 17 00:00:00 2001 From: Kaituo Li Date: Wed, 1 May 2024 07:34:48 -0700 Subject: [PATCH] Remove unnecessary sleep between test runs (#746) 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 https://github.com/opensearch-project/opensearch-dashboards-functional-test/pull/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 (cherry picked from commit e509a0387c0f0eface1282bd540317d2d26415e7) --- .../workflows/remote-integ-tests-workflow.yml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/remote-integ-tests-workflow.yml b/.github/workflows/remote-integ-tests-workflow.yml index 94ca4d26..d5eb5359 100644 --- a/.github/workflows/remote-integ-tests-workflow.yml +++ b/.github/workflows/remote-integ-tests-workflow.yml @@ -140,21 +140,16 @@ jobs: - 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 + { + echo 'FILELIST<> "$GITHUB_ENV" 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 + for i in $FILELIST; do yarn cypress:run-without-security --browser electron --spec "${i}" sleep 60 done