2 Documentation This test restarts all controllers to verify recovery of car data from persistene
3 Default Tags 3-node-cluster
4 Resource ../../../libraries/ClusterKeywords.robot
5 Resource ../../../libraries/CarsAndPeople.robot
6 Variables ../../../variables/Variables.py
9 ${CAR_SHARD} shard-car-config
11 ${KARAF_HOME} ${WORKSPACE}/${BUNDLEFOLDER}
12 @{controllers} ${ODL_SYSTEM_IP} ${ODL_SYSTEM_2_IP} ${ODL_SYSTEM_3_IP}
18 [Documentation] Find leader in the car shard
19 ${CAR_LEADER} Get Leader And Verify ${CAR_SHARD}
20 Set Suite Variable ${CAR_LEADER}
22 Delete Cars From Leader
23 [Documentation] Delete cars in Leader
24 Delete All Cars And Verify ${CAR_LEADER}
26 Stop All Controllers After Delete
27 [Documentation] Stop all controllers
28 Stop One Or More Controllers @{controllers}
29 Wait For Cluster Down ${STOP_TIMEOUT} @{controllers}
31 Start All Controllers After Delete
32 [Documentation] Start all controller
33 Start One Or More Controllers @{controllers}
34 Wait For Cluster Sync ${START_TIMEOUT} @{controllers}
36 Get Car Leader After First Restart
37 [Documentation] Find leader in the car shard
38 ${CAR_LEADER} Get Leader And Verify ${CAR_SHARD}
39 Set Suite Variable ${CAR_LEADER}
41 Verify No Cars On Leader After Restart
42 [Documentation] Verify no cars after restart
43 Wait Until Keyword Succeeds ${START_TIMEOUT} 2s Check Cars Deleted ${CAR_LEADER}
46 [Documentation] Add cars in Leader
47 Add Cars And Verify ${CAR_LEADER} ${NUM_CARS}
49 Stop All Controllers After Add
50 [Documentation] Stop all controllers
51 Stop One Or More Controllers @{controllers}
52 Wait For Cluster Down ${STOP_TIMEOUT} @{controllers}
54 Start All Controllers After Add
55 [Documentation] Start all controllers
56 Start One Or More Controllers @{controllers}
57 Wait For Cluster Sync ${START_TIMEOUT} @{controllers}
59 Get Car Leader After Second Restart
60 [Documentation] Find leader in the car shard
61 ${CAR_LEADER} Get Leader And Verify ${CAR_SHARD}
62 Set Suite Variable ${CAR_LEADER}
64 Get Cars From Leader After Restart
65 [Documentation] Get cars from Leader and verify
66 Wait Until Keyword Succeeds ${START_TIMEOUT} 2s Get Cars And Verify ${CAR_LEADER} ${NUM_CARS}
69 [Documentation] Find followers in the car shard
70 ${CAR_FOLLOWERS} Get All Followers ${CAR_SHARD}
71 Set Suite Variable ${CAR_FOLLOWERS}
73 Get Cars From Follower1 After Restart
74 [Documentation] Get cars in follower and verify
75 Wait Until Keyword Succeeds ${START_TIMEOUT} 2s Get Cars And Verify @{CAR_FOLLOWERS}[0] ${NUM_CARS}
77 Get Cars From Follower2 After Restart
78 [Documentation] Get cars in follower and verify
79 Wait Until Keyword Succeeds ${START_TIMEOUT} 2s Get Cars And Verify @{CAR_FOLLOWERS}[1] ${NUM_CARS}