Skip to content

Commit

Permalink
Reduce test flakiness
Browse files Browse the repository at this point in the history
  • Loading branch information
MetRonnie committed Jun 28, 2024
1 parent 8fce26b commit 0b95080
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 32 deletions.
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
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 0b95080

Please sign in to comment.