Skip to content

Commit

Permalink
add test for timeout propagation
Browse files Browse the repository at this point in the history
  • Loading branch information
vladak committed Apr 5, 2022
1 parent 4ec2a65 commit aced162
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tools/src/test/python/test_command_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,20 @@ def test_invalid_configuration_commands_no_dict():
assert str(exc_info.value).find("is not a dictionary") != -1


def test_timeout_propagation():
"""
Make sure the timeouts propagate from CommandSequenceBase to CommandSequence.
"""
expected_timeout = 11
expected_api_timeout = 22
cmd_seq_base = CommandSequenceBase("foo", [{"command": ['foo']}],
api_timeout=expected_timeout,
async_api_timeout=expected_api_timeout)
cmd_seq = CommandSequence(cmd_seq_base)
assert cmd_seq.api_timeout == expected_timeout
assert cmd_seq.async_api_timeout == expected_api_timeout


@pytest.mark.skipif(not os.path.exists('/bin/sh')
or not os.path.exists('/bin/echo'),
reason="requires Unix")
Expand Down

0 comments on commit aced162

Please sign in to comment.