Skip to content

Commit

Permalink
De-flake functional tests (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
MetRonnie authored Sep 24, 2024
1 parent 1198335 commit 174729e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
14 changes: 7 additions & 7 deletions tests/functional/data-store/00-prune-optional-break.t
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,25 @@ init_workflow "${TEST_NAME_BASE}" << __FLOW__
final cycle point = 1
[[graph]]
P1 = """
a? => b? => c?
d => e
"""
a => b? => c?
a => d => e
"""
[runtime]
[[a,c,e]]
script = true
[[b]]
script = false
[[d]]
script = """
cylc workflow-state \${CYLC_WORKFLOW_ID}//1/b:failed --interval=2
cylc pause \$CYLC_WORKFLOW_ID
"""
cylc workflow-state \${CYLC_WORKFLOW_ID}//1/b:failed --interval=2 --max-polls=20 -v
cylc pause \$CYLC_WORKFLOW_ID
"""
__FLOW__

# run workflow
run_ok "${TEST_NAME_BASE}-run" cylc play "${WORKFLOW_NAME}"

cylc workflow-state "${WORKFLOW_NAME}/1/d:succeeded" --interval=2 --max-polls=60
cylc workflow-state "${WORKFLOW_NAME}//1/d:succeeded" --interval=2 --max-polls=60 -v

# query workflow
TEST_NAME="${TEST_NAME_BASE}-prune-optional-break"
Expand Down
3 changes: 2 additions & 1 deletion tests/functional/flow-triggers/10-specific-flow.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# THIS FILE IS PART OF THE CYLC WORKFLOW ENGINE.
# Copyright (C) NIWA & British Crown (Met Office) & Contributors.
#
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
Expand All @@ -15,6 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#-------------------------------------------------------------------------------
# Test targeting a specific flow, with trigger --wait.

. "$(dirname "$0")/test_header"
set_test_number 2
Expand Down
8 changes: 6 additions & 2 deletions tests/functional/flow-triggers/10-specific-flow/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
[[trigger-happy]]
script = """
cylc trigger --flow=2 --wait ${CYLC_WORKFLOW_ID}//1/f
cylc__job__poll_grep_workflow_log "1/d/01:submitted.*running"
cylc trigger --flow=2 ${CYLC_WORKFLOW_ID}//1/b
"""
[[d]]
script = """
if [[ "$CYLC_TASK_SUBMIT_NUMBER" == "1" ]]; then
cylc trigger --flow=2 ${CYLC_WORKFLOW_ID}//1/b
fi
"""
2 changes: 1 addition & 1 deletion tests/functional/reload/26-stalled.t
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ init_workflow "${TEST_NAME_BASE}" <<'__FLOW__'
[scheduler]
[[events]]
stall handlers = cylc reload %(workflow)s
stall timeout = PT10S
stall timeout = PT30S
abort on stall timeout = True
# Prevent infinite loop if the bug resurfaces
workflow timeout = PT3M
Expand Down
3 changes: 2 additions & 1 deletion tests/functional/triggering/08-fam-finish-any.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# THIS FILE IS PART OF THE CYLC WORKFLOW ENGINE.
# Copyright (C) NIWA & British Crown (Met Office) & Contributors.
#
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
Expand All @@ -17,6 +17,7 @@
#-------------------------------------------------------------------------------
# Test correct expansion of 'FAM:finish-any'
. "$(dirname "$0")/test_header"
skip_macos_gh_actions
set_test_number 2
reftest
exit

0 comments on commit 174729e

Please sign in to comment.