Skip to content

Commit

Permalink
Merge pull request #4 from datamel/polling-intervals
Browse files Browse the repository at this point in the history
Add polling interval test and change log entry.
  • Loading branch information
dpmatthews authored May 3, 2022
2 parents 31fd51f + df7f4c4 commit 9549dbd
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ workflow source argument), and rename the `--flow-name` option to

### Fixes

[#4844](https://github.com/cylc/cylc-flow/pull/4844) - Fixes bug where
execution polling intervals used in combination with an execution time limit
resulted in incorrect polling intervals.

[#4829](https://github.com/cylc/cylc-flow/pull/4829) -
Suppress deprecated configuration warnings in Cylc 7 compatibility mode.

Expand Down
54 changes: 54 additions & 0 deletions tests/functional/execution-time-limit/04-polling-intervals.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/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
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# 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 execution time limit works correctly with polling intervals

. "$(dirname "$0")/test_header"
set_test_number 6

init_workflow "${TEST_NAME_BASE}" << __FLOW__
[scheduling]
[[graph]]
R1 = nolimit & limit95M & limit1H & limit10M & limit70S
[runtime]
[[root]]
script = "echo Hello"
execution polling intervals = 3*PT30S, PT10M, PT1H
[[nolimit]]
[[limit95M]]
execution time limit = PT95M
[[limit1H]]
execution time limit = PT1H
[[limit10M]]
execution time limit = PT10M
[[limit70S]]
execution time limit = PT70S
__FLOW__

run_ok "${TEST_NAME_BASE}-validate" cylc validate "${WORKFLOW_NAME}"

cylc play "${WORKFLOW_NAME}"

poll_grep_workflow_log "INFO - DONE"

grep_workflow_log_ok grep-limit10M "\[1/limit10M running job:01 flows:1\] health: execution timeout=PT20M, polling intervals=3\*PT30S,PT9M30S,PT2M,PT7M,..."
grep_workflow_log_ok grep-limit1H "\[1/limit1H running job:01 flows:1\] health: execution timeout=PT1H10M, polling intervals=3\*PT30S,PT10M,PT49M30S,PT2M,PT7M,..."
grep_workflow_log_ok grep-limit70S "\[1/limit70S running job:01 flows:1\] health: execution timeout=PT11M10S, polling intervals=2\*PT30S,PT1M10S,PT2M,PT7M,..."
grep_workflow_log_ok grep-limit95M "\[1/limit95M running job:01 flows:1\] health: execution timeout=PT1H45M, polling intervals=3\*PT30S,PT10M,PT1H,PT24M30S,PT2M,PT7M,..."
grep_workflow_log_ok grep-no-limit "\[1/nolimit running job:01 flows:1\] health: execution timeout=None, polling intervals=3\*PT30S,PT10M,PT1H,..."

purge

0 comments on commit 9549dbd

Please sign in to comment.