From 382ab05a3da8a289facec382e7d26038c5a4bf3e Mon Sep 17 00:00:00 2001 From: Mohammed Ismail Date: Fri, 16 Apr 2021 17:11:18 +0200 Subject: [PATCH] CI: fix on commands delay Signed-off-by: Mohammed Ismail --- ci-scripts/cls_physim1.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ci-scripts/cls_physim1.py b/ci-scripts/cls_physim1.py index 9dc05b8427..1389f1e831 100644 --- a/ci-scripts/cls_physim1.py +++ b/ci-scripts/cls_physim1.py @@ -196,13 +196,15 @@ class PhySim: # Waiting to complete the running test count = 0 isFinished = False - while(count < 26 and isFinished == False): - time.sleep(60) + while(count < 24 and isFinished == False): + time.sleep(58) 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()) if result is not None: 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: isFinished = True count += 1 @@ -220,7 +222,6 @@ class PhySim: while(isFinished1 == False): time.sleep(10) mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6) - logging.debug(mySSH.getBefore()) if re.search('No resources found', mySSH.getBefore()): isFinished1 = True if isFinished1 == True: