CI: logs delay fix

Signed-off-by: Mohammed Ismail <mohammed.ismail@openairinterface.org>
This commit is contained in:
Mohammed Ismail
2021-04-26 16:07:40 +02:00
parent 92b19e2d45
commit 7acc966b94
+5 -6
View File
@@ -200,18 +200,17 @@ class PhySim:
# Waiting to complete the running test # Waiting to complete the running test
count = 0 count = 0
isFinished = False isFinished = False
testCompleteCount = 0 tmpPodNames = podNames
while(count < 25 and isFinished == False): while(count < 25 and isFinished == False):
time.sleep(58) time.sleep(58)
for podName in podNames: for podName in tmpPodNames:
mySSH.command(f'oc logs --tail=1 {podName} 2>&1', '\$', 6) mySSH.command(f'oc logs --tail=1 {podName} 2>&1', '\$', 6)
if mySSH.getBefore().count('Finished') != 0: if mySSH.getBefore().count('Finished') != 0:
testCompleteCount += 1 tmpPodNames.remove(podName)
time.sleep(1) time.sleep(2)
if testCompleteCount == 12: if not tmpPodNames:
isFinished = True isFinished = True
count += 1 count += 1
testCompleteCount = 0
if isFinished: if isFinished:
logging.debug('\u001B[1m PhySim test is Complete\u001B[0m') logging.debug('\u001B[1m PhySim test is Complete\u001B[0m')