Code Review
/
integration
/
test.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Refactor cluster car-people test to reduce test time in case of failure
[integration/test.git]
/
csit
/
suites
/
controller
/
Clustering_Datastore
/
030_car_failover_crud_on_new_leader.robot
diff --git
a/csit/suites/controller/Clustering_Datastore/030_car_failover_crud_on_new_leader.robot
b/csit/suites/controller/Clustering_Datastore/030_car_failover_crud_on_new_leader.robot
index 3d519754734fee9180f0b2352fece499ddf033db..8c8f4326687505da7625224035ca57959ba370c2 100644
(file)
--- a/
csit/suites/controller/Clustering_Datastore/030_car_failover_crud_on_new_leader.robot
+++ b/
csit/suites/controller/Clustering_Datastore/030_car_failover_crud_on_new_leader.robot
@@
-2,65
+2,77
@@
Documentation This test brings down the current leader of the "car" shard and then executes CRUD
... operations on the new leader
Default Tags 3-node-cluster
Documentation This test brings down the current leader of the "car" shard and then executes CRUD
... operations on the new leader
Default Tags 3-node-cluster
-Library ../../../libraries/CrudLibrary.py
-Library ../../../libraries/UtilLibrary.py
-Library ../../../libraries/ClusterStateLibrary.py
Resource ../../../libraries/ClusterKeywords.robot
Resource ../../../libraries/ClusterKeywords.robot
+Resource ../../../libraries/CarsAndPeople.robot
+Variables ../../../variables/Variables.py
*** Variables ***
${CAR_SHARD} shard-car-config
${NUM_CARS} ${50}
${NUM_ORIG_CARS} ${10}
${KARAF_HOME} ${WORKSPACE}/${BUNDLEFOLDER}
*** Variables ***
${CAR_SHARD} shard-car-config
${NUM_CARS} ${50}
${NUM_ORIG_CARS} ${10}
${KARAF_HOME} ${WORKSPACE}/${BUNDLEFOLDER}
+${START_TIMEOUT} 300s
+${STOP_TIMEOUT} 180s
*** Test Cases ***
*** Test Cases ***
-Get old car leader
- ${OLD_CAR_LEADER} Wait For Leader To Be Found ${CAR_SHARD}
+Get Old Car Leader
+ [Documentation] Find leader in the car shard
+ ${OLD_CAR_LEADER} Get Leader And Verify ${CAR_SHARD}
Set Suite Variable ${OLD_CAR_LEADER}
Set Suite Variable ${OLD_CAR_LEADER}
-Delete cars on old leader
+Delete Cars On Old Leader
+ [Documentation] Delete cars in Leader
Delete All Cars And Verify ${OLD_CAR_LEADER}
Delete All Cars And Verify ${OLD_CAR_LEADER}
-Add original cars on old leader
+Add Original Cars On Old Leader
+ [Documentation] Add new cars in Leader and verify
Add Cars And Verify ${OLD_CAR_LEADER} ${NUM_ORIG_CARS}
Add Cars And Verify ${OLD_CAR_LEADER} ${NUM_ORIG_CARS}
-Switch
car l
eader
+Switch
Car L
eader
[Documentation] Stop the leader to cause a new leader to be elected
[Documentation] Stop the leader to cause a new leader to be elected
- ${NEW_CAR_LEADER} Switch Leader ${CAR_SHARD} ${OLD_CAR_LEADER}
+ Stop One Or More Controllers ${OLD_CAR_LEADER}
+ Wait For Controller Down ${STOP_TIMEOUT} ${OLD_CAR_LEADER}
+ ${NEW_CAR_LEADER} Wait Until Keyword Succeeds 30s 2s Get Leader And Verify ${CAR_SHARD} ${OLD_CAR_LEADER}
Set Suite Variable ${NEW_CAR_LEADER}
Set Suite Variable ${NEW_CAR_LEADER}
-Get original cars on new leader
- Wait Until Keyword Succeeds 60s 2s Get Cars And Verify ${NEW_CAR_LEADER} ${NUM_ORIG_CARS}
+Get Original Cars On New Leader
+ [Documentation] Get cars in new Leader
+ Get Cars And Verify ${NEW_CAR_LEADER} ${NUM_ORIG_CARS}
-Delete cars on new leader
+Delete Cars On New Leader
+ [Documentation] Delete cars in new Leader
Delete All Cars And Verify ${NEW_CAR_LEADER}
Delete All Cars And Verify ${NEW_CAR_LEADER}
-Add
new cars and get cars from new l
eader
+Add
New Cars And Get Cars From New L
eader
[Documentation] Add cars and get added cars from the Leader
Add Cars And Verify ${NEW_CAR_LEADER} ${NUM_CARS}
Get Car Followers
[Documentation] Add cars and get added cars from the Leader
Add Cars And Verify ${NEW_CAR_LEADER} ${NUM_CARS}
Get Car Followers
+ [Documentation] Find followers in the car shard
${CAR_FOLLOWERS} Get All Followers ${CAR_SHARD} ${OLD_CAR_LEADER}
Set Suite Variable ${CAR_FOLLOWERS}
${CAR_FOLLOWERS} Get All Followers ${CAR_SHARD} ${OLD_CAR_LEADER}
Set Suite Variable ${CAR_FOLLOWERS}
-Get
added cars f
rom Follower
+Get
Added Cars F
rom Follower
[Documentation] Get the added cars from the Follower
[Documentation] Get the added cars from the Follower
-
Wait Until Keyword Succeeds 60s 2s
Get Cars And Verify @{CAR_FOLLOWERS}[0] ${NUM_CARS}
+ Get Cars And Verify @{CAR_FOLLOWERS}[0] ${NUM_CARS}
-Delete cars on Follower
+Delete Cars On Follower
+ [Documentation] Delete cars in follower
Delete All Cars And Verify @{CAR_FOLLOWERS}[0]
Delete All Cars And Verify @{CAR_FOLLOWERS}[0]
-Add
cars f
rom Follower
+Add
Cars F
rom Follower
[Documentation] Add more cars from the Follower
Add Cars And Verify @{CAR_FOLLOWERS}[0] ${NUM_CARS}
[Documentation] Add more cars from the Follower
Add Cars And Verify @{CAR_FOLLOWERS}[0] ${NUM_CARS}
-Get
added cars from new l
eader
+Get
Added Cars From New L
eader
[Documentation] Get added cars from the new leader
[Documentation] Get added cars from the new leader
-
Wait Until Keyword Succeeds 60s 2s
Get Cars And Verify ${NEW_CAR_LEADER} ${NUM_CARS}
+ Get Cars And Verify ${NEW_CAR_LEADER} ${NUM_CARS}
-Restart old Car leader
+Restart Old Car Leader
+ [Documentation] Start old car Leader
Start One Or More Controllers ${OLD_CAR_LEADER}
Start One Or More Controllers ${OLD_CAR_LEADER}
+ Wait For Controller Sync ${START_TIMEOUT} ${OLD_CAR_LEADER}
-Get
added cars from old l
eader
+Get
Added Cars From Old L
eader
[Documentation] Get the added cars from the old leader
[Documentation] Get the added cars from the old leader
- Wait Until Keyword Succeeds
60s
2s Get Cars And Verify ${OLD_CAR_LEADER} ${NUM_CARS}
+ Wait Until Keyword Succeeds
${START_TIMEOUT}
2s Get Cars And Verify ${OLD_CAR_LEADER} ${NUM_CARS}