2 Documentation This test brings down the current leader of the "car" shard and then executes CRUD operations on the new leader
3 Default Tags 3-node-cluster
4 Library ../../../libraries/CrudLibrary.py
5 Library ../../../libraries/UtilLibrary.py
6 Library ../../../libraries/ClusterStateLibrary.py
7 Resource ../../../libraries/ClusterKeywords.robot
10 ${PEOPLE_SHARD} shard-people-config
12 ${KARAF_HOME} ${WORKSPACE}/${BUNDLEFOLDER}
16 [Documentation] Stop the leader to cause a new leader to be elected
17 ${OLD_PEOPLE_LEADER} Wait For Leader To Be Found ${PEOPLE_SHARD}
18 ${NEW_PEOPLE_LEADER} Switch Leader ${PEOPLE_SHARD} ${OLD_PEOPLE_LEADER}
19 Set Suite Variable ${OLD_PEOPLE_LEADER}
20 Set Suite Variable ${NEW_PEOPLE_LEADER}
22 Delete people from new leader
23 Delete All People And Verify ${NEW_PEOPLE_LEADER}
25 Add people and get from new leader
26 [Documentation] Add people and get people from new leader
27 Add People And Verify ${NEW_PEOPLE_LEADER} ${NUM_ENTRIES}
30 ${PEOPLE_FOLLOWERS} Get All Followers ${PEOPLE_SHARD} ${OLD_PEOPLE_LEADER}
31 Set Suite Variable ${PEOPLE_FOLLOWERS}
33 Get added people from Follower
34 Wait Until Keyword Succeeds 60s 2s Get People And Verify @{PEOPLE_FOLLOWERS}[0] ${NUM_ENTRIES}
36 Delete people from new Follower
37 Delete All People And Verify @{PEOPLE_FOLLOWERS}[0]
39 Add people from new Follower
40 [Documentation] Add people and get people from follower
41 Add People And Verify @{PEOPLE_FOLLOWERS}[0] ${NUM_ENTRIES}
43 Get added people from new leader
44 Wait Until Keyword Succeeds 60s 2s Get People And Verify ${NEW_PEOPLE_LEADER} ${NUM_ENTRIES}
46 Restart old People leader
47 Start One Or More Controllers ${OLD_PEOPLE_LEADER}
49 Get added people from old leader
50 Wait Until Keyword Succeeds 60s 2s Get People And Verify ${OLD_PEOPLE_LEADER} ${NUM_ENTRIES}