Wait the pod from terminating to terminated before the end of test

Change-Id: I625f788e2b4efcde6cf1982a075439c2c8991498
diff --git a/libraries/k8s.robot b/libraries/k8s.robot
index 1b3ac39..2f2772e 100644
--- a/libraries/k8s.robot
+++ b/libraries/k8s.robot
@@ -267,4 +267,9 @@
     Log    ${currentStatusofPod}
     Should Contain    ${currentStatusofPod}    ${expectedStatus}
 
-
+Check Expected Running Pods Number By Label
+    [Arguments]    ${namespace}    ${key}    ${value}    ${number}
+    [Documentation]    Succeeds if the desired pod has expected number replicas
+    ${rc}    ${count}    Run and Return Rc and Output
+    ...    kubectl -n ${namespace} get pods -l ${key}=${value} -o json | jq -r ".items[].status.phase" | wc -l
+    Should Be Equal as Integers    ${count}    ${number}