Fix drools-applications csit test cases 09/121309/1
authorRam Krishna Verma <ram_krishna.verma@bell.ca>
Tue, 11 May 2021 13:35:53 +0000 (09:35 -0400)
committerJim Hahn <jrh3@att.com>
Thu, 13 May 2021 11:46:39 +0000 (11:46 +0000)
In the recent runs, it was found that controller might take fews more seconds to come up and get reported by the telemetry api. So, increasing the "max" wait time for the test cases to 1 min. And it won't slow down the tests as the check will be made every 15 sec to verify if the assertions are passing. The moment they pass, it will move on.

Issue-ID: POLICY-3257
Change-Id: If29738cae60a6a21da11fa7a6045b4279012b82e
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
(cherry picked from commit d9716d4fd3f3c5babd22307883a1620e9a65b68e)

csit/tests/drools-applications-test.robot

index 18a38be..627ae1b 100644 (file)
@@ -19,8 +19,7 @@ Healthcheck
 
 Controller
     [Documentation]    Checks controller is up
-    ${resp}=  PeformGetRequest  /policy/pdp/engine/controllers/usecases/drools/facts  ${DROOLS_IP}  9696  200
-    Should Be Equal As Strings    ${resp.json()['usecases']}  1
+    Wait Until Keyword Succeeds  2 min  15 sec  VerifyController
 
 MakeTopics
     [Documentation]    Creates the Policy topics
@@ -202,6 +201,10 @@ VfwExecute
 
 *** Keywords ***
 
+VerifyController
+    ${resp}=  PeformGetRequest  /policy/pdp/engine/controllers/usecases/drools/facts  ${DROOLS_IP}  9696  200
+    Should Be Equal As Strings  ${resp.json()['usecases']}  1
+
 PeformGetRequest
      [Arguments]  ${url}  ${hostname}  ${port}  ${expectedstatus}
      ${auth}=  Create List  demo@people.osaaf.org  demo123456!