Skip to content

Commit

Permalink
Reduce test flakiness
Browse files Browse the repository at this point in the history
  • Loading branch information
MetRonnie committed Jul 1, 2024
1 parent bacf07f commit 79338bc
Show file tree
Hide file tree
Showing 15 changed files with 35 additions and 36 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test_functional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,11 @@ jobs:
timeout-minutes: 1
run: |
find "$HOME/cylc-run" -name '*.err' -type f \
-exec echo '====== {} ======' \; -exec cat '{}' \;
-exec echo \; -exec echo '====== {} ======' \; -exec cat '{}' \;
find "$HOME/cylc-run" -name '*.log' -type f \
-exec echo '====== {} ======' \; -exec cat '{}' \;
-exec echo \; -exec echo '====== {} ======' \; -exec cat '{}' \;
find "${TMPDIR:-/tmp}/${USER}/cylctb-"* -type f \
-exec echo '====== {} ======' \; -exec cat '{}' \;
-exec echo \; -exec echo '====== {} ======' \; -exec cat '{}' \;
- name: Set artifact upload name
if: always()
Expand Down
26 changes: 13 additions & 13 deletions tests/functional/cylc-set/00-set-succeeded/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@
[[graph]]
R1 = """
foo & bar => post<m>
setter
foo:started & bar:started => setter
"""
[runtime]
[[post<m>]]
[[foo, bar]]
script = false
[[setter]]
script = """
# wait for foo and bar to fail.
for TASK in foo bar
do
cylc workflow-state \
script = """
# wait for foo and bar to fail.
for TASK in foo bar
do
cylc workflow-state \
${CYLC_WORKFLOW_ID}//${CYLC_TASK_CYCLE_POINT}/${TASK}:failed \
--max-polls=10 --interval=1
done
# set foo succeeded (via --output)
cylc set -o succeeded $CYLC_WORKFLOW_ID//$CYLC_TASK_CYCLE_POINT/foo
# set bar succeeded (via default)
cylc set $CYLC_WORKFLOW_ID//$CYLC_TASK_CYCLE_POINT/bar
"""
--max-polls=10 --interval=2
done
# set foo succeeded (via --output)
cylc set -o succeeded $CYLC_WORKFLOW_ID//$CYLC_TASK_CYCLE_POINT/foo
# set bar succeeded (via default)
cylc set $CYLC_WORKFLOW_ID//$CYLC_TASK_CYCLE_POINT/bar
"""
2 changes: 1 addition & 1 deletion tests/functional/cylc-set/00-set-succeeded/reference.log
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1/setter -triggered off [] in flow 1
1/setter -triggered off ['1/bar', '1/foo'] in flow 1
1/foo -triggered off [] in flow 1
1/bar -triggered off [] in flow 1
1/post_m1 -triggered off ['1/bar', '1/foo'] in flow 1
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/cylc-set/03-set-failed/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[scheduler]
[[events]]
inactivity timeout = PT20S
inactivity timeout = PT1M
abort on inactivity timeout = True

[scheduling]
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/cylc-set/04-switch/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[scheduler]
[[events]]
inactivity timeout = PT20S
inactivity timeout = PT1M
abort on inactivity timeout = True
stall timeout = PT0S
abort on stall timeout = True
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/cylc-set/05-expire/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[scheduler]
[[events]]
inactivity timeout = PT20S
inactivity timeout = PT1M
abort on inactivity timeout = True
stall timeout = PT0S
abort on stall timeout = True
Expand Down
3 changes: 1 addition & 2 deletions tests/functional/cylc-trigger/06-already-active/flow.cylc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# test triggering an already active task
[scheduler]
[[events]]
inactivity timeout = PT20S
inactivity timeout = PT1M
abort on inactivity timeout = True
[scheduling]
[[graph]]
Expand All @@ -19,4 +19,3 @@
cylc__job__poll_grep_workflow_log \
"1/triggeree.* ignoring trigger - already active" -E
"""

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[scheduler]
[[events]]
inactivity timeout = PT20S
inactivity timeout = PT1M
abort on inactivity timeout = True
stall timeout = PT20S
abort on stall timeout = True
Expand Down
14 changes: 7 additions & 7 deletions tests/functional/restart/50-two-flows/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[scheduler]
[[events]]
inactivity timeout = PT20S
inactivity timeout = PT1M
abort on inactivity timeout = True
[scheduling]
[[graph]]
Expand All @@ -20,10 +20,10 @@
[[b, d]]
[[c]]
script = """
if ((CYLC_TASK_FLOW_NUMBERS == 1)); then
cylc trigger --flow=new --meta="cheese wizard" \
"$CYLC_WORKFLOW_ID//1/a"
cylc__job__poll_grep_workflow_log -E "\[1/a/02\(flows=2\):submitted\] => running"
cylc stop $CYLC_WORKFLOW_ID
fi
if ((CYLC_TASK_FLOW_NUMBERS == 1)); then
cylc trigger --flow=new --meta="cheese wizard" \
"$CYLC_WORKFLOW_ID//1/a"
cylc__job__poll_grep_workflow_log -E "\[1/a/02\(flows=2\):submitted\] => running"
cylc stop $CYLC_WORKFLOW_ID
fi
"""
2 changes: 1 addition & 1 deletion tests/functional/restart/59-retart-timeout/flow.cylc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[scheduler]
[[events]]
inactivity timeout = PT20S
inactivity timeout = PT1M
abort on inactivity timeout = True
[scheduling]
[[graph]]
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/runahead/default-future/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
UTC mode = True
allow implicit tasks = True
[[events]]
inactivity timeout = PT20S
inactivity timeout = PT1M
abort on inactivity timeout = True
[scheduling]
initial cycle point = 20100101T00
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/runahead/no_final/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
abort on stall timeout = True
stall timeout = PT0S
abort on inactivity timeout = True
inactivity timeout = PT20S
inactivity timeout = PT1M
[scheduling]
runahead limit = P1
initial cycle point = 20100101T00
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/shutdown/08-now1.t
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ set_test_number 5

install_workflow "${TEST_NAME_BASE}" "${TEST_NAME_BASE}"
run_ok "${TEST_NAME_BASE}-validate" cylc validate "${WORKFLOW_NAME}"
workflow_run_ok "${TEST_NAME_BASE}-run" cylc play --no-detach "${WORKFLOW_NAME}"
workflow_run_ok "${TEST_NAME_BASE}-run" cylc play -v --no-detach "${WORKFLOW_NAME}"
LOGD="$RUN_DIR/${WORKFLOW_NAME}/log"
grep_ok 'INFO - Workflow shutting down - REQUEST(NOW)' "${LOGD}/scheduler/log"
JLOGD="${LOGD}/job/1/t1/01"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Test holding a task that hasn't spawned yet.
[scheduler]
[[events]]
inactivity timeout = PT20S
inactivity timeout = PT1M
abort on inactivity timeout = True
[scheduling]
[[graph]]
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/spawn-on-demand/15-stop-flow-3/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[scheduler]
allow implicit tasks = True
[[events]]
inactivity timeout = PT20S
inactivity timeout = PT1M
abort on inactivity timeout = True
[scheduling]
[[xtriggers]]
Expand Down

0 comments on commit 79338bc

Please sign in to comment.