Add 10s polling to allow transactions to complete
[integration/test.git] / csit / suites / controller / Clustering_Datastore / car_persistence_recovery.robot
index 9092935c1b0eb2a03cacfd2800786964b42d653f..433e8afdf48f51eff2e6567066677023d3259dc3 100644 (file)
@@ -13,10 +13,12 @@ Documentation     This test restarts all controllers to verify recovery of car d
 ...               All data is deleted at the end of the suite.
 ...               This suite expects car module to have a separate Shard.
 Suite Setup       Setup
+Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
 Default Tags      clustering    carpeople    critical
 Library           Collections
 Resource          ${CURDIR}/../../../libraries/CarPeople.robot
 Resource          ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
 Resource          ${CURDIR}/../../../libraries/TemplatedRequests.robot
 Variables         ${CURDIR}/../../../variables/Variables.py
 
@@ -26,13 +28,16 @@ ${MEMBER_START_TIMEOUT}    300s
 ${VAR_DIR}        ${CURDIR}/../../../variables/carpeople/crud
 
 *** Test Cases ***
-Add_Cars_On_Leader
+Add_Cars_On_Leader_And_Verify
     [Documentation]    Single big PUT to datastore to add cars to car Leader.
     TemplatedRequests.Put_As_Json_Templated    folder=${VAR_DIR}/cars    session=${car_leader_session}    iterations=${CAR_ITEMS}
+    : FOR    ${session}    IN    @{ClusterManagement__session_list}
+    \    BuiltIn.Wait_Until_Keyword_Succeeds    10s    2s    TemplatedRequests.Get_As_Json_Templated    folder=${VAR_DIR}/cars    session=${session}
+    \    ...    verify=True    iterations=${CAR_ITEMS}
 
-Kill_All_Members
-    [Documentation]    Kill all controllers.
-    ClusterManagement.Kill_Members_From_List_Or_All    confirm=True
+Stop_All_Members
+    [Documentation]    Stop all controllers.
+    ClusterManagement.Stop_Members_From_List_Or_All    confirm=True
 
 Start_All_Members
     [Documentation]    Start all controllers (should restore the persisted data).
@@ -58,5 +63,5 @@ Delete_Cars_On_Leader
 *** Keywords ***
 Setup
     [Documentation]    Initialize resources, memorize car shard leader and followers.
-    ClusterManagement.ClusterManagement_Setup
+    SetupUtils.Setup_Utils_For_Setup_And_Teardown
     CarPeople.Set_Variables_For_Shard    shard_name=car