Refactor cluster car-people test to reduce test time in case of failure
[integration/test.git] / csit / suites / controller / Clustering_Datastore / 020_crud_on_any_follower.robot
index abe66b228a75709bee9371368dde7a21cbad2a97..aa8ff496f2e1d4e38b956154482309960a2eac66 100644 (file)
@@ -1,13 +1,8 @@
 *** Settings ***
 Documentation     This test finds the followers of certain shards in a 3-Node cluster and executes CRUD operations on any one follower
 Default Tags      3-node-cluster
-Library           Collections
-Library           ../../../libraries/Common.py
-Library           ../../../libraries/CrudLibrary.py
-Library           ../../../libraries/SettingsLibrary.py
-Library           ../../../libraries/UtilLibrary.py
-Library           ../../../libraries/ClusterStateLibrary.py
 Resource          ../../../libraries/ClusterKeywords.robot
+Resource          ../../../libraries/CarsAndPeople.robot
 Variables         ../../../variables/Variables.py
 
 *** Variables ***
@@ -18,10 +13,12 @@ ${NUM_ENTRIES}    ${40}
 
 *** Test Cases ***
 Get Car Followers
+    [Documentation]    Find followers in the car shard
     ${CAR_FOLLOWERS}    Get All Followers    ${SHARD_CAR_NAME}
     Set Suite Variable    ${CAR_FOLLOWERS}
 
 Get People Followers
+    [Documentation]    Find followers in the people shard
     ${PEOPLE_FOLLOWERS}    Get All Followers    ${SHARD_PEOPLE_NAME}
     Set Suite Variable    ${PEOPLE_FOLLOWERS}
 
@@ -29,47 +26,47 @@ Get Car-Person Followers
     ${CAR_PERSON_FOLLOWERS}    Get All Followers    ${SHARD_CAR_PERSON_NAME}
     Set Suite Variable    ${CAR_PERSON_FOLLOWERS}
 
-Delete cars from Follower1
+Delete Cars From Follower1
     Delete All Cars And Verify    @{CAR_FOLLOWERS}[0]
 
-Delete people from Follower1
+Delete People From Follower1
     Delete All People And Verify    @{PEOPLE_FOLLOWERS}[0]
 
-Delete car-persons from Follower1
+Delete Car-Persons from Follower1
     Delete All Cars-Persons And Verify    @{CAR_PERSON_FOLLOWERS}[0]
 
-Add cars and get cars from Follower1
+Add Cars And Get Cars From Follower1
     [Documentation]    Add cars and get added cars from Follower1
     Add Cars And Verify    @{CAR_FOLLOWERS}[0]    ${NUM_ENTRIES}
 
-Get added cars from Follower2
+Get Added Cars From Follower2
     [Documentation]    Get added cars from Follower2
-    Wait Until Keyword Succeeds    60s    2s    Get Cars And Verify    @{CAR_FOLLOWERS}[1]    ${NUM_ENTRIES}
+    Get Cars And Verify    @{CAR_FOLLOWERS}[1]    ${NUM_ENTRIES}
 
-Add people and get people from Follower1
+Add People And Get People From Follower1
     [Documentation]    Add people and get people from Follower1
     Add People And Verify    @{PEOPLE_FOLLOWERS}[0]    ${NUM_ENTRIES}
 
-Get added people from Follower2
+Get Added People From Follower2
     [Documentation]    Get added people from Follower2
-    Wait Until Keyword Succeeds    60s    2s    Get People And Verify    @{PEOPLE_FOLLOWERS}[1]    ${NUM_ENTRIES}
+    Get People And Verify    @{PEOPLE_FOLLOWERS}[1]    ${NUM_ENTRIES}
 
-Add car-person mapping and get car-person mapping from Follower1
+Add Car-Person Mapping And Get Car-Person Mapping From Follower1
     Add Car Person And Verify    @{CAR_PERSON_FOLLOWERS}[0]
 
-Purchase cars on Follower1
+Purchase Cars On Follower1
     [Documentation]    Purchase cars using Follower1
     Buy Cars And Verify    @{CAR_PERSON_FOLLOWERS}[0]    ${NUM_ENTRIES}
 
-Get car-person mappings from Follower1
+Get Car-Person Mappings From Follower1
     [Documentation]    Get car-person mappings from Follower1 to see all entries
-    Wait Until Keyword Succeeds    60s    2s    Get Car-Person Mappings And Verify    @{CAR_PERSON_FOLLOWERS}[0]    ${NUM_ENTRIES}
+    Get Car-Person Mappings And Verify    @{CAR_PERSON_FOLLOWERS}[0]    ${NUM_ENTRIES}
 
-Get car-person mappings from Leader
+Get Car-Person Mappings From Leader
     [Documentation]    Get car-person mappings from the Leader to see all entries
-    ${CURRENT_CAR_LEADER}    Wait For Leader To Be Found    ${SHARD_CAR_PERSON_NAME}
-    Wait Until Keyword Succeeds    60s    2s    Get Car-Person Mappings And Verify    ${CURRENT_CAR_LEADER}    ${NUM_ENTRIES}
+    ${CURRENT_CAR_LEADER}    Get Leader And Verify    ${SHARD_CAR_PERSON_NAME}
+    Get Car-Person Mappings And Verify    ${CURRENT_CAR_LEADER}    ${NUM_ENTRIES}
 
-Get car-person mappings from Follower2
+Get Car-Person Mappings From Follower2
     [Documentation]    Get car-person mappings from Follower2 to see all entries
-    Wait Until Keyword Succeeds    60s    2s    Get Car-Person Mappings And Verify    @{CAR_PERSON_FOLLOWERS}[1]    ${NUM_ENTRIES}
+    Get Car-Person Mappings And Verify    @{CAR_PERSON_FOLLOWERS}[1]    ${NUM_ENTRIES}