Skip to content

Commit f10b34d

Browse files
committed
tests: Add simpel heartbeat test
1 parent a80cae8 commit f10b34d

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tests/test_command_runner.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
__author__ = 'Orsiris de Jong'
1919
__copyright__ = 'Copyright (C) 2015-2025 Orsiris de Jong'
2020
__licence__ = 'BSD 3 Clause'
21-
__build__ = '2025040901'
21+
__build__ = '2025041601'
2222

2323

2424
import sys
@@ -778,6 +778,12 @@ def test_no_close_queues():
778778
assert exit_code == 0, 'We did not succeed in running the thread'
779779

780780

781+
def test_heartbeat():
782+
exit_code, output = command_runner(PING_CMD, heartbeat=2, shell=False)
783+
assert exit_code == 0, 'Exit code should be 0 for ping command with heartbeat'
784+
assert 'Still running command after 2 seconds' in output, 'Output should have heartbeat'
785+
786+
781787
if __name__ == "__main__":
782788
print("Example code for %s, %s" % (__intname__, __build__))
783789
test_standard_ping_with_encoding()
@@ -804,5 +810,7 @@ def test_no_close_queues():
804810
test_null_redir()
805811
test_split_streams()
806812
test_on_exit()
807-
test_priority()
813+
test_low_priority()
814+
test_high_priority()
808815
test_no_close_queues()
816+
test_heartbeat()

0 commit comments

Comments
 (0)