fix the username to login undercloud in Apex
[doctor.git] / doctor_tests / scenario / fault_management.py
index b1fe809..869311b 100644 (file)
@@ -32,7 +32,7 @@ dev=$(sudo ip a | awk '/ {compute_ip}\//{{print $NF}}')
 sleep 1
 sudo ip link set $dev down
 echo "doctor set link down at" $(date "+%s.%N")
-sleep 10
+sleep 30
 sudo ip link set $dev up
 sleep 1
 """
@@ -180,10 +180,17 @@ class FaultManagement(object):
         notification_time = \
             self.consumer.notified_time - \
             self.monitor.detected_time
+
+        self.log.info('doctor fault management notification_time=%s'
+                      % notification_time)
+
         if notification_time < 1 and notification_time > 0:
-            self.log.info('doctor fault management test successfully,'
-                          'notification_time=%s' % notification_time)
+            self.log.info('doctor fault management test successfully')
         else:
+            if self.conf.profiler_type:
+                self.log.info('run doctor fault management profile.......')
+                self.run_profiler()
+
             raise Exception('doctor fault management test failed, '
                             'notification_time=%s' % notification_time)