Skip to content

Commit aced162

Browse files
committed
add test for timeout propagation
1 parent 4ec2a65 commit aced162

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tools/src/test/python/test_command_sequence.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,20 @@ def test_invalid_configuration_commands_no_dict():
8181
assert str(exc_info.value).find("is not a dictionary") != -1
8282

8383

84+
def test_timeout_propagation():
85+
"""
86+
Make sure the timeouts propagate from CommandSequenceBase to CommandSequence.
87+
"""
88+
expected_timeout = 11
89+
expected_api_timeout = 22
90+
cmd_seq_base = CommandSequenceBase("foo", [{"command": ['foo']}],
91+
api_timeout=expected_timeout,
92+
async_api_timeout=expected_api_timeout)
93+
cmd_seq = CommandSequence(cmd_seq_base)
94+
assert cmd_seq.api_timeout == expected_timeout
95+
assert cmd_seq.async_api_timeout == expected_api_timeout
96+
97+
8498
@pytest.mark.skipif(not os.path.exists('/bin/sh')
8599
or not os.path.exists('/bin/echo'),
86100
reason="requires Unix")

0 commit comments

Comments
 (0)