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.txt
10 ${PEOPLE_SHARD} shard-people-config
15 [Documentation] Stop the leader to cause a new leader to be elected
16 ${OLD_PEOPLE_LEADER} Wait For Leader ${PEOPLE_SHARD}
17 ${NEW_PEOPLE_LEADER} Switch Leader ${PEOPLE_SHARD} ${OLD_PEOPLE_LEADER}
18 Set Suite Variable ${OLD_PEOPLE_LEADER}
19 Set Suite Variable ${NEW_PEOPLE_LEADER}
21 Delete people from new leader
22 Delete All People And Verify ${NEW_PEOPLE_LEADER}
24 Add people and get from new leader
25 [Documentation] Add people and get people from new leader
26 Add People And Verify ${NEW_PEOPLE_LEADER} ${NUM_ENTRIES}
29 ${PEOPLE_FOLLOWERS} Get All Followers ${PEOPLE_SHARD}
30 Set Suite Variable ${PEOPLE_FOLLOWERS}
32 Get added people from Follower
33 Wait Until Keyword Succeeds 60s 2s Get People And Verify @{PEOPLE_FOLLOWERS}[0] ${NUM_ENTRIES}
35 Delete people from new Follower
36 Delete All People And Verify @{PEOPLE_FOLLOWERS}[0]
38 Add people from new Follower
39 [Documentation] Add people and get people from follower
40 Add People And Verify @{PEOPLE_FOLLOWERS}[0] ${NUM_ENTRIES}
42 Get added people from new leader
43 Wait Until Keyword Succeeds 60s 2s Get People And Verify ${NEW_PEOPLE_LEADER} ${NUM_ENTRIES}
45 Restart old People leader
46 StartController ${OLD_PEOPLE_LEADER} ${USER_NAME} ${PASSWORD} ${KARAF_HOME} ${PORT}
48 Get added people from old leader
49 Wait Until Keyword Succeeds 60s 2s Get People And Verify ${OLD_PEOPLE_LEADER} ${NUM_ENTRIES}