From ce0498e77d2d65e551fe50c983160a3829e75522 Mon Sep 17 00:00:00 2001 From: Tim Pillinger Date: Fri, 26 Jul 2024 10:49:46 +0100 Subject: [PATCH] fix tests --- cylc/flow/task_events_mgr.py | 2 +- tests/functional/hold-release/11-retrying/flow.cylc | 8 +++++--- tests/functional/retries/02-xtriggers/flow.cylc | 2 +- tests/functional/special/08-clock-trigger-retry.t | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/cylc/flow/task_events_mgr.py b/cylc/flow/task_events_mgr.py index 07a7ffa67cb..b2494b7b0f8 100644 --- a/cylc/flow/task_events_mgr.py +++ b/cylc/flow/task_events_mgr.py @@ -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) diff --git a/tests/functional/hold-release/11-retrying/flow.cylc b/tests/functional/hold-release/11-retrying/flow.cylc index 0e08699af09..1e006fa5b0a 100644 --- a/tests/functional/hold-release/11-retrying/flow.cylc +++ b/tests/functional/hold-release/11-retrying/flow.cylc @@ -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\)' """ diff --git a/tests/functional/retries/02-xtriggers/flow.cylc b/tests/functional/retries/02-xtriggers/flow.cylc index a46c0c3a03e..a89808771b1 100644 --- a/tests/functional/retries/02-xtriggers/flow.cylc +++ b/tests/functional/retries/02-xtriggers/flow.cylc @@ -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 diff --git a/tests/functional/special/08-clock-trigger-retry.t b/tests/functional/special/08-clock-trigger-retry.t index fa3a65ee150..ea8cac9366e 100644 --- a/tests/functional/special/08-clock-trigger-retry.t +++ b/tests/functional/special/08-clock-trigger-retry.t @@ -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)