提交 268f2585 编写于 作者: L Lukáš Doktor

avocado.plugins.remote: Disable timeout for remote execution

Default timeout for execution is 60s. This patch removes this for the
remote `avocado ...` run as there is no sensible default for it, nor
convinient way to set it on the cmdline. It should be relatively safe as
Avocado on remote machine should timeout using the same timeouts as on
host and in case the machine dies fabric fails the execution and
returns.
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
上级 e6c99ec0
......@@ -44,7 +44,8 @@ class RemoteTestRunner(TestRunner):
'--archive %s' % (self.remote_test_dir,
self.result.stream.job_unique_id,
" ".join(urls)))
result = self.result.remote.run(avocado_cmd, ignore_status=True)
result = self.result.remote.run(avocado_cmd, ignore_status=True,
timeout=None)
for json_output in result.stdout.splitlines():
# We expect dictionary:
if json_output.startswith('{') and json_output.endswith('}'):
......
......@@ -29,7 +29,8 @@ class RemoteTestRunnerTest(unittest.TestCase):
Remote = flexmock()
args = ("cd ~/avocado/tests; avocado run --force-job-id sleeptest.1 "
"--json - --archive sleeptest")
(Remote.should_receive('run').with_args(args, ignore_status=True)
(Remote.should_receive('run')
.with_args(args, timeout=None, ignore_status=True)
.once().and_return(test_results))
Results = flexmock(remote=Remote, urls=['sleeptest'],
stream=stream)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册