Skip to content

Commit

Permalink
Merge pull request #6294 from MetRonnie/comm
Browse files Browse the repository at this point in the history
Demote "timer stopped" warning to info & fix functional tests `contains_ok` function
  • Loading branch information
hjoliver authored Aug 9, 2024
2 parents a433765 + 9dc786c commit 25db3e1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cylc/flow/timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def stop(self) -> None:
if self.timeout is None:
return
self.timeout = None
LOG.warning(f"{self.name} stopped")
LOG.info(f"{self.name} stopped")

def timed_out(self) -> bool:
"""Return whether timed out yet."""
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/lib/bash/test_header
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ contains_ok() {
local FILE_CONTROL="${2:--}"
local TEST_NAME
TEST_NAME="$(basename "${FILE_TEST}")-contains-ok"
LANG=C comm -13 <(sort "${FILE_TEST}") <(sort "${FILE_CONTROL}") \
LANG=C comm -13 <(LANG=C sort "${FILE_TEST}") <(LANG=C sort "${FILE_CONTROL}") \
1>"${TEST_NAME}.stdout" 2>"${TEST_NAME}.stderr"
if [[ -s "${TEST_NAME}.stdout" ]]; then
mkdir -p "${TEST_LOG_DIR}"
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/test_timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import logging
from time import sleep

import pytest
Expand All @@ -23,7 +24,7 @@

def test_Timer(caplog: pytest.LogCaptureFixture):
"""Test the Timer class."""
caplog.set_level('WARNING')
caplog.set_level(logging.INFO)
timer = Timer("bob timeout", 1.0)

# timer attributes
Expand Down

0 comments on commit 25db3e1

Please sign in to comment.