Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wxtim committed Jul 26, 2024
1 parent ce1a66c commit ce0498e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cylc/flow/task_events_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1332,11 +1332,11 @@ def _process_message_failed(
else:
# There is an execution retry lined up.
timer = itask.try_timers[TimerFlags.EXECUTION_RETRY]
self._retry_task(itask, timer.timeout)
delay_msg = f"retrying in {timer.delay_timeout_as_str()}"
LOG.warning(
f'[{itask}] => {TASK_OUTPUT_FAILED} with {full_message}'
f' \n({delay_msg})')
self._retry_task(itask, timer.timeout)
msg = f"{self.JOB_FAILED}, {delay_msg}"
self.setup_event_handlers(itask, self.EVENT_RETRY, msg)
self._reset_job_timers(itask)
Expand Down
8 changes: 5 additions & 3 deletions tests/functional/hold-release/11-retrying/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,20 @@ t-retry-able => t-analyse
'1/t-retry-able/01:running.* => waiting'
cylc__job__poll_grep_workflow_log -E \
'1/t-retry-able:waiting.* retrying in PT15S'
'1/t-retry-able:waiting.*'
cylc__job__poll_grep_workflow_log -E \
'retrying in PT15S'
cylc hold "${CYLC_WORKFLOW_ID}//1/t-retry-able"
cylc__job__poll_grep_workflow_log -E \
'1/t-retry-able:waiting.* => waiting\(held\)'
cylc release "${CYLC_WORKFLOW_ID}//1/t-retry-able"
cylc__job__poll_grep_workflow_log -E \
'1/t-retry-able:waiting\(held\).* => waiting'
cylc__job__poll_grep_workflow_log -E \
'1/t-retry-able:waiting.* => waiting\(queued\)'
"""
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/retries/02-xtriggers/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# get a list of the times cylc says tasks will retry after
mapfile -t RETRY_TIMES \
< <(sed -n 's/.*retrying.*after \(.*\)).*/\1/p' log)
< <(sed -n 's@.*retrying.*after \(.*\))).*@\1@p' log)
# get a list of the times when the xtriggers were actually
# satisfied
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/special/08-clock-trigger-retry.t
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ workflow_run_ok "${TEST_NAME_BASE}-run" cylc play --no-detach "$WORKFLOW_NAME"

log_scan "${TEST_NAME_BASE}-log-scan" \
"${WORKFLOW_RUN_DIR}/log/scheduler/log" 2 1 \
"\[20150101.*/foo.* retrying in PT5S" \
"\[20150101.*/foo:waiting\] => failed with failed/ERR" \
"xtrigger satisfied: _cylc_retry_20150101"
# (if task resubmits immediately instead of waiting PT5S, xtrigger msg will not appear)

Expand Down

0 comments on commit ce0498e

Please sign in to comment.