提交 3fb85c98 编写于 作者: S Suqin Huang

Close un-used session

"Denying new connections due to the limit on number of connections" error
if don't close the session
Signed-off-by: NSuqin Huang <shuang@redhat.com>
上级 c04387e1
......@@ -59,12 +59,11 @@ def run(test, params, env):
return map(retrieve_log, driver_logs.split(','))
def reboot(vm, session=None, timeout=600):
def reboot(vm, timeout=600):
"""
Reboot guest.
:param vm: VM onject.
:param session: VM session.
"""
nic_idx = len(vm.virtnet) - 1
while nic_idx >= 0:
......@@ -140,19 +139,20 @@ def run(test, params, env):
try:
error_context.context("Show file extentions", logging.info)
show_file_extentions(session)
session = reboot(vm, session)
session.close()
session = reboot(vm)
uninstall_flag = params.get("need_uninstall", "no")
if uninstall_flag == "yes":
operation = "uninstall_driver"
error_context.context("Uninstall driver", logging.info)
install_driver(session, operation)
session = reboot(vm, session)
session = reboot(vm)
operation = "install_driver"
error_context.context("Install driver", logging.info)
install_driver(session, operation)
session = reboot(vm, session)
session = reboot(vm)
if uninstall_flag == "no":
operation = "verify_driver"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册