Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demote "timer stopped" warning to info & fix functional tests contains_ok function #6294

Merged
merged 2 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading