Merge "Use configured process timeout when closing a process"
This commit is contained in:
commit
9c247d565d
@ -328,7 +328,7 @@ def execute_ping(parameters, ssh_client=None, check=True):
|
||||
try:
|
||||
result = sh.execute(command=command,
|
||||
ssh_client=ssh_client,
|
||||
timeout=parameters.deadline + 2.,
|
||||
timeout=parameters.deadline + 3.,
|
||||
expect_exit_status=None,
|
||||
network_namespace=parameters.network_namespace)
|
||||
except sh.ShellError as ex:
|
||||
|
@ -197,6 +197,8 @@ class ShellProcessFixture(tobiko.SharedFixture):
|
||||
LOG.exception("Error closing STDERR stream: %r", self.stderr)
|
||||
|
||||
def close(self, timeout: tobiko.Seconds = None):
|
||||
if timeout is None:
|
||||
timeout = self.parameters.timeout
|
||||
self.close_stdin()
|
||||
try:
|
||||
# Drain all incoming data from STDOUT and STDERR
|
||||
|
@ -413,6 +413,7 @@ def run_pcs_resource_operation(resource: str,
|
||||
output = execute_pcs(command_args,
|
||||
ssh_client=ssh_client,
|
||||
add_stderr=add_stderr,
|
||||
timeout=operation_wait + 10.,
|
||||
sudo=True)
|
||||
except sh.ShellCommandFailed as exc:
|
||||
if attempt.is_last:
|
||||
|
Loading…
x
Reference in New Issue
Block a user