Commit 382ab05a authored by Mohammed Ismail's avatar Mohammed Ismail

CI: fix on commands delay

Signed-off-by: default avatarMohammed Ismail <mohammed.ismail@openairinterface.org>
parent 72d5cec7
...@@ -196,13 +196,15 @@ class PhySim: ...@@ -196,13 +196,15 @@ class PhySim:
# Waiting to complete the running test # Waiting to complete the running test
count = 0 count = 0
isFinished = False isFinished = False
while(count < 26 and isFinished == False): while(count < 24 and isFinished == False):
time.sleep(60) time.sleep(58)
mySSH.command('oc get pods -l app.kubernetes.io/instance=physim | grep dlsim', '\$', 6) mySSH.command('oc get pods -l app.kubernetes.io/instance=physim | grep dlsim', '\$', 6)
time.sleep(2)
result = re.search('oai-nr-dlsim[\S\d\w]+', mySSH.getBefore()) result = re.search('oai-nr-dlsim[\S\d\w]+', mySSH.getBefore())
if result is not None: if result is not None:
podName1 = result.group() podName1 = result.group()
mySSH.command(f'oc logs {podName1} 2>&1 | tail -n 1', '\$', 6) mySSH.command(f'oc logs --tail=1 {podName1} 2>&1', '\$', 6)
time.sleep(1)
if mySSH.getBefore().count('Finished') != 0: if mySSH.getBefore().count('Finished') != 0:
isFinished = True isFinished = True
count += 1 count += 1
...@@ -220,7 +222,6 @@ class PhySim: ...@@ -220,7 +222,6 @@ class PhySim:
while(isFinished1 == False): while(isFinished1 == False):
time.sleep(10) time.sleep(10)
mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6) mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6)
logging.debug(mySSH.getBefore())
if re.search('No resources found', mySSH.getBefore()): if re.search('No resources found', mySSH.getBefore()):
isFinished1 = True isFinished1 = True
if isFinished1 == True: if isFinished1 == True:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment