Skip to content

Commit

Permalink
Merge pull request #56888 from rishabh-d-dave/vstart-runnner-timeout
Browse files Browse the repository at this point in the history
qa/vstart_runner: don't let command run after timeout

Reviewed-by: Venky Shankar <vshankar@redhat.com>
  • Loading branch information
rishabh-d-dave committed Apr 17, 2024
2 parents 205c679 + 03b3329 commit adaccd7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions qa/tasks/vstart_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def _write_stderr(self, err):
else:
self.stderr.write(err)

def wait(self):
def wait(self, timeout=None):
# Null subproc.stdin so communicate() does not try flushing/closing it
# again.
if self.stdin is not None and self.stdin.closed:
Expand All @@ -249,7 +249,7 @@ def wait(self):
else:
return

out, err = self.subproc.communicate()
out, err = self.subproc.communicate(timeout=timeout)
out, err = rm_nonascii_chars(out), rm_nonascii_chars(err)
self._write_stdout(out)
self._write_stderr(err)
Expand Down Expand Up @@ -488,7 +488,7 @@ def _do_run(self, args, check_status=True, wait=True, stdout=None,
)

if wait:
proc.wait()
proc.wait(timeout)

return proc

Expand Down Expand Up @@ -1399,7 +1399,7 @@ def exec_test():
log.info('\nrunning vstart.sh now...')
# usually, i get vstart.sh running completely in less than 100
# seconds.
remote.run(args=args, env=vstart_env, timeout=(3 * 60))
remote.run(args=args, env=vstart_env, timeout=(5 * 60))
log.info('\nvstart.sh finished running')

# Wait for OSD to come up so that subsequent injectargs etc will
Expand Down

0 comments on commit adaccd7

Please sign in to comment.