Procházet zdrojové kódy

AMBARI-11382. test_execute_retryable_command_succeed fails intermittently

Sumit Mohanty před 10 roky
rodič
revize
d12a79c402

+ 4 - 1
ambari-agent/src/main/python/ambari_agent/ActionQueue.py

@@ -279,7 +279,10 @@ class ActionQueue(threading.Thread):
       if isCommandBackground:
         return
       else:
-        status = self.COMPLETED_STATUS if commandresult['exitcode'] == 0 else self.FAILED_STATUS
+        if commandresult['exitcode'] == 0:
+          status = self.COMPLETED_STATUS
+        else:
+          status = self.FAILED_STATUS
 
       if status != self.COMPLETED_STATUS and retryAble == True and maxAttempts > numAttempts:
         delay = self.get_retry_delay(delay)