From 882191d656beaccb4527d67dcb4f01b9f09d7a85 Mon Sep 17 00:00:00 2001 From: Narasimhan V Date: Thu, 21 Jun 2018 11:34:33 +0530 Subject: [PATCH] multipath: Replaced the sleep with wait_for We were sleeping instead of waiting for the service to become stable, after a service restart. So, replaced the sleep with wait_for. Signed-off-by: Narasimhan V --- avocado/utils/multipath.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/avocado/utils/multipath.py b/avocado/utils/multipath.py index 3d928360..e8eee17c 100755 --- a/avocado/utils/multipath.py +++ b/avocado/utils/multipath.py @@ -58,8 +58,9 @@ def form_conf_mpath_file(blacklist="", defaults_extra=""): # The reason for sleep here is to give some time for change in # multipath.conf file to take effect. time.sleep(5) - service.SpecificServiceManager(get_svc_name()).restart() - time.sleep(4) + mpath_svc = service.SpecificServiceManager(get_svc_name()) + mpath_svc.restart() + wait.wait_for(mpath_svc.status, timeout=10) def device_exists(path): -- GitLab