*** Settings ***
-Documentation This test focuses on testing buy-car RPC over 3 Leader reboots.
+Documentation This test focuses on testing buy-car RPC over 3 Leader reboots.
...
-... Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
...
-... All purchases are against the same node, which is the first one to get rebooted.
+... All purchases are against the same node, which is the first one to get rebooted.
...
-... All data is deleted at the end of the suite.
-... This suite expects car, people and car-people modules to have separate Shards.
-Suite Setup Setup
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Default Tags clustering carpeople critical
-Library Collections
-Resource ${CURDIR}/../../../libraries/CarPeople.robot
-Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Variables ${CURDIR}/../../../variables/Variables.py
+... All data is deleted at the end of the suite.
+... This suite expects car, people and car-people modules to have separate Shards.
+
+Library Collections
+Resource ${CURDIR}/../../../libraries/CarPeople.robot
+Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Variables ${CURDIR}/../../../variables/Variables.py
+
+Suite Setup Setup
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+
+Default Tags clustering carpeople critical
+
*** Variables ***
-${CARPEOPLE_ITEMS} ${100}
-${MEMBER_START_TIMEOUT} 300s
-@{SHARD_NAME_LIST} car people car-people
-${VAR_DIR} ${CURDIR}/../../../variables/carpeople/crud
+${CARPEOPLE_ITEMS} ${100}
+${MEMBER_START_TIMEOUT} 300s
+@{SHARD_NAME_LIST} car people car-people
+${VAR_DIR} ${CURDIR}/../../../variables/carpeople/crud
+
*** Test Cases ***
Add_Cars_To_Leader_And_Verify
[Documentation] Add all needed cars to car Leader, verify on each member.
${car_items} = BuiltIn.Evaluate ${CARPEOPLE_ITEMS} * 4
- TemplatedRequests.Put_As_Json_Templated folder=${VAR_DIR}/cars session=${car_leader_session} iterations=${car_items}
+ TemplatedRequests.Put_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${car_leader_session}
+ ... iterations=${car_items}
FOR ${session} IN @{ClusterManagement__session_list}
- BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session}
- ... verify=True iterations=${car_items}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 10s
+ ... 2s
+ ... TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${session}
+ ... verify=True
+ ... iterations=${car_items}
END
Add_People_To_First_Follower_And_Verify
${people_items} = BuiltIn.Evaluate ${CARPEOPLE_ITEMS} * 4
CarPeople.Add_Several_People session=${people_first_follower_session} iterations=${people_items}
FOR ${session} IN @{ClusterManagement__session_list}
- BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/people session=${session}
- ... verify=True iterations=${people_items}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 10s
+ ... 2s
+ ... TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/people
+ ... session=${session}
+ ... verify=True
+ ... iterations=${people_items}
END
Buy_Cars_On_Leader_And_Verify
[Documentation] Buy some cars on the leader member.
${iter_start} = BuiltIn.Evaluate 0 * ${CARPEOPLE_ITEMS} + 1
- CarPeople.Buy_Several_Cars session=${car-people_leader_session} iterations=${CARPEOPLE_ITEMS} iter_start=${iter_start}
+ CarPeople.Buy_Several_Cars
+ ... session=${car-people_leader_session}
+ ... iterations=${CARPEOPLE_ITEMS}
+ ... iter_start=${iter_start}
${total_iterations} = BuiltIn.Evaluate 1 * ${CARPEOPLE_ITEMS}
FOR ${session} IN @{ClusterManagement__session_list}
- BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${session}
- ... verify=True iterations=${total_iterations}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 10s
+ ... 2s
+ ... TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/car-people
+ ... session=${session}
+ ... verify=True
+ ... iterations=${total_iterations}
END
Buy_Cars_On_Follower_And_Verify
[Documentation] Buy some cars on the first follower member.
${iter_start} = BuiltIn.Evaluate 1 * ${CARPEOPLE_ITEMS} + 1
- CarPeople.Buy_Several_Cars session=${car-people_first_follower_session} iterations=${CARPEOPLE_ITEMS} iter_start=${iter_start}
+ CarPeople.Buy_Several_Cars
+ ... session=${car-people_first_follower_session}
+ ... iterations=${CARPEOPLE_ITEMS}
+ ... iter_start=${iter_start}
${total_iterations} = BuiltIn.Evaluate 2 * ${CARPEOPLE_ITEMS}
FOR ${session} IN @{ClusterManagement__session_list}
- BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${session}
- ... verify=True iterations=${total_iterations}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 10s
+ ... 2s
+ ... TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/car-people
+ ... session=${session}
+ ... verify=True
+ ... iterations=${total_iterations}
END
Reboot_People_Leader
[Documentation] Previous people Leader is rebooted. We should never stop the people first follower, this is where people are registered.
ClusterManagement.Stop_Single_Member ${people_leader_index} confirm=True
- ClusterManagement.Start_Single_Member ${people_leader_index} wait_for_sync=True timeout=${MEMBER_START_TIMEOUT}
- BuiltIn.Wait_Until_Keyword_Succeeds 30s 2s ClusterManagement.Verify_Leader_Exists_For_Each_Shard shard_name_list=${SHARD_NAME_LIST} shard_type=config
+ ClusterManagement.Start_Single_Member
+ ... ${people_leader_index}
+ ... wait_for_sync=True
+ ... timeout=${MEMBER_START_TIMEOUT}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 30s
+ ... 2s
+ ... ClusterManagement.Verify_Leader_Exists_For_Each_Shard
+ ... shard_name_list=${SHARD_NAME_LIST}
+ ... shard_type=config
Buy_Cars_On_Leader_After_Reboot_And_Verify
[Documentation] Buy some cars on the leader member.
${iter_start} = BuiltIn.Evaluate 2 * ${CARPEOPLE_ITEMS} + 1
- CarPeople.Buy_Several_Cars session=${car-people_leader_session} iterations=${CARPEOPLE_ITEMS} iter_start=${iter_start}
+ CarPeople.Buy_Several_Cars
+ ... session=${car-people_leader_session}
+ ... iterations=${CARPEOPLE_ITEMS}
+ ... iter_start=${iter_start}
${total_iterations} = BuiltIn.Evaluate 3 * ${CARPEOPLE_ITEMS}
FOR ${session} IN @{ClusterManagement__session_list}
- BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${session}
- ... verify=True iterations=${total_iterations}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 10s
+ ... 2s
+ ... TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/car-people
+ ... session=${session}
+ ... verify=True
+ ... iterations=${total_iterations}
END
Buy_Cars_On_Follower_After_Reboot_And_Verify
[Documentation] Buy some cars on the first follower member.
${iter_start} = BuiltIn.Evaluate 3 * ${CARPEOPLE_ITEMS} + 1
- CarPeople.Buy_Several_Cars session=${car-people_first_follower_session} iterations=${CARPEOPLE_ITEMS} iter_start=${iter_start}
+ CarPeople.Buy_Several_Cars
+ ... session=${car-people_first_follower_session}
+ ... iterations=${CARPEOPLE_ITEMS}
+ ... iter_start=${iter_start}
${total_iterations} = BuiltIn.Evaluate 4 * ${CARPEOPLE_ITEMS}
FOR ${session} IN @{ClusterManagement__session_list}
- BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${session}
- ... verify=True iterations=${total_iterations}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 10s
+ ... 2s
+ ... TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/car-people
+ ... session=${session}
+ ... verify=True
+ ... iterations=${total_iterations}
END
Delete_All_CarPeople
[Documentation] DELETE cars container. No verification beyond http status.
TemplatedRequests.Delete_Templated folder=${VAR_DIR}/cars session=${car_leader_session}
+
*** Keywords ***
Setup
[Documentation] Initialize resources, memorize shard leaders, compute item distribution.
*** Settings ***
-Documentation This test focuses on testing buy-car RPC over the Leader isolation.
+Documentation This test focuses on testing buy-car RPC over the Leader isolation.
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
...
-... All purchases are against the same node, which is the first one to get isolated.
+... All purchases are against the same node, which is the first one to get isolated.
...
-... All data is deleted at the end of the suite.
-... This suite expects car, people and car-people modules to have separate Shards.
-Suite Setup Setup
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Default Tags clustering carpeople critical
-Library Collections
-Resource ${CURDIR}/../../../libraries/CarPeople.robot
-Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Variables ${CURDIR}/../../../variables/Variables.py
+... All data is deleted at the end of the suite.
+... This suite expects car, people and car-people modules to have separate Shards.
+
+Library Collections
+Resource ${CURDIR}/../../../libraries/CarPeople.robot
+Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Variables ${CURDIR}/../../../variables/Variables.py
+
+Suite Setup Setup
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+
+Default Tags clustering carpeople critical
+
*** Variables ***
-${CARPEOPLE_ITEMS} ${100}
-${MEMBER_START_TIMEOUT} 300s
-@{SHARD_NAME_LIST} car people car-people
-${VAR_DIR} ${CURDIR}/../../../variables/carpeople/crud
+${CARPEOPLE_ITEMS} ${100}
+${MEMBER_START_TIMEOUT} 300s
+@{SHARD_NAME_LIST} car people car-people
+${VAR_DIR} ${CURDIR}/../../../variables/carpeople/crud
+
*** Test Cases ***
Add_Cars_To_Leader_And_Verify
[Documentation] Add all needed cars to car Leader, verify on each member.
${car_items} = BuiltIn.Evaluate ${CARPEOPLE_ITEMS} * 4
- TemplatedRequests.Put_As_Json_Templated folder=${VAR_DIR}/cars session=${car_leader_session} iterations=${car_items}
+ TemplatedRequests.Put_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${car_leader_session}
+ ... iterations=${car_items}
FOR ${session} IN @{ClusterManagement__session_list}
- BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session}
- ... verify=True iterations=${car_items}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 10s
+ ... 2s
+ ... TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${session}
+ ... verify=True
+ ... iterations=${car_items}
END
Add_People_To_First_Follower_And_Verify
${people_items} = BuiltIn.Evaluate ${CARPEOPLE_ITEMS} * 4
CarPeople.Add_Several_People session=${people_first_follower_session} iterations=${people_items}
FOR ${session} IN @{ClusterManagement__session_list}
- BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/people session=${session}
- ... verify=True iterations=${people_items}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 10s
+ ... 2s
+ ... TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/people
+ ... session=${session}
+ ... verify=True
+ ... iterations=${people_items}
END
Buy_Cars_On_Leader_And_Verify
[Documentation] Buy some cars on the leader member.
${iter_start} = BuiltIn.Evaluate 0 * ${CARPEOPLE_ITEMS} + 1
- CarPeople.Buy_Several_Cars session=${car-people_leader_session} iterations=${CARPEOPLE_ITEMS} iter_start=${iter_start}
+ CarPeople.Buy_Several_Cars
+ ... session=${car-people_leader_session}
+ ... iterations=${CARPEOPLE_ITEMS}
+ ... iter_start=${iter_start}
${total_iterations} = BuiltIn.Evaluate 1 * ${CARPEOPLE_ITEMS}
FOR ${session} IN @{ClusterManagement__session_list}
- BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${session}
- ... verify=True iterations=${total_iterations}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 10s
+ ... 2s
+ ... TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/car-people
+ ... session=${session}
+ ... verify=True
+ ... iterations=${total_iterations}
END
Buy_Cars_On_Follower_And_Verify
[Documentation] Buy some cars on the first follower member.
${iter_start} = BuiltIn.Evaluate 1 * ${CARPEOPLE_ITEMS} + 1
- CarPeople.Buy_Several_Cars session=${car-people_first_follower_session} iterations=${CARPEOPLE_ITEMS} iter_start=${iter_start}
+ CarPeople.Buy_Several_Cars
+ ... session=${car-people_first_follower_session}
+ ... iterations=${CARPEOPLE_ITEMS}
+ ... iter_start=${iter_start}
${total_iterations} = BuiltIn.Evaluate 2 * ${CARPEOPLE_ITEMS}
FOR ${session} IN @{ClusterManagement__session_list}
- BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${session}
- ... verify=True iterations=${total_iterations}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 10s
+ ... 2s
+ ... TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/car-people
+ ... session=${session}
+ ... verify=True
+ ... iterations=${total_iterations}
END
Isolate_and_Rejoin_People_Leader
[Documentation] Previous people Leader is isolated. We should never stop the people first follower, this is where people are registered.
ClusterManagement.Isolate_Member_From_List_Or_All ${people_leader_index}
- BuiltIn.Wait_Until_Keyword_Succeeds 10x 2s ClusterManagement.Verify_Shard_Leader_Elected people config ${True}
- ... ${people_leader_index} ${people_follower_indices}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 10x
+ ... 2s
+ ... ClusterManagement.Verify_Shard_Leader_Elected
+ ... people
+ ... config
+ ... ${True}
+ ... ${people_leader_index}
+ ... ${people_follower_indices}
ClusterManagement.Rejoin_Member_From_List_Or_All ${people_leader_index}
- BuiltIn.Wait_Until_Keyword_Succeeds 30s 2s ClusterManagement.Verify_Leader_Exists_For_Each_Shard shard_name_list=${SHARD_NAME_LIST} shard_type=config
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 30s
+ ... 2s
+ ... ClusterManagement.Verify_Leader_Exists_For_Each_Shard
+ ... shard_name_list=${SHARD_NAME_LIST}
+ ... shard_type=config
Buy_Cars_On_Leader_After_Rejoin_And_Verify
[Documentation] Buy some cars on the leader member.
${iter_start} = BuiltIn.Evaluate 2 * ${CARPEOPLE_ITEMS} + 1
- CarPeople.Buy_Several_Cars session=${car-people_leader_session} iterations=${CARPEOPLE_ITEMS} iter_start=${iter_start}
+ CarPeople.Buy_Several_Cars
+ ... session=${car-people_leader_session}
+ ... iterations=${CARPEOPLE_ITEMS}
+ ... iter_start=${iter_start}
${total_iterations} = BuiltIn.Evaluate 3 * ${CARPEOPLE_ITEMS}
FOR ${session} IN @{ClusterManagement__session_list}
- BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${session}
- ... verify=True iterations=${total_iterations}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 10s
+ ... 2s
+ ... TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/car-people
+ ... session=${session}
+ ... verify=True
+ ... iterations=${total_iterations}
END
Buy_Cars_On_Follower_After_Rejoin_And_Verify
[Documentation] Buy some cars on the first follower member.
${iter_start} = BuiltIn.Evaluate 3 * ${CARPEOPLE_ITEMS} + 1
- CarPeople.Buy_Several_Cars session=${car-people_first_follower_session} iterations=${CARPEOPLE_ITEMS} iter_start=${iter_start}
+ CarPeople.Buy_Several_Cars
+ ... session=${car-people_first_follower_session}
+ ... iterations=${CARPEOPLE_ITEMS}
+ ... iter_start=${iter_start}
${total_iterations} = BuiltIn.Evaluate 4 * ${CARPEOPLE_ITEMS}
FOR ${session} IN @{ClusterManagement__session_list}
- BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${session}
- ... verify=True iterations=${total_iterations}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 10s
+ ... 2s
+ ... TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/car-people
+ ... session=${session}
+ ... verify=True
+ ... iterations=${total_iterations}
END
Delete_All_CarPeople
[Documentation] DELETE cars container. No verification beyond http status.
TemplatedRequests.Delete_Templated folder=${VAR_DIR}/cars session=${car_leader_session}
+
*** Keywords ***
Setup
[Documentation] Initialize resources, memorize shard leaders, compute item distribution.
*** Settings ***
-Documentation Suite mixing basic operations with restart of car Leader.
+Documentation Suite mixing basic operations with restart of car Leader.
...
-... Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
...
-... This test stops the current leader of the "car" shard and then executes CRD
-... operations on the new leader and a new follower. The stopped member is brought back.
-... This suite uses 3 different car sets, same size but different starting ID.
+... This test stops the current leader of the "car" shard and then executes CRD
+... operations on the new leader and a new follower. The stopped member is brought back.
+... This suite uses 3 different car sets, same size but different starting ID.
...
-... Other models and shards (people, car-people) are not accessed by this suite.
+... Other models and shards (people, car-people) are not accessed by this suite.
...
-... All data is deleted at the end of the suite.
-... This suite expects car module to have a separate Shard.
-Suite Setup Setup
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Default Tags clustering carpeople critical
-Library Collections
-Resource ${CURDIR}/../../../libraries/CarPeople.robot
-Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Variables ${CURDIR}/../../../variables/Variables.py
+... All data is deleted at the end of the suite.
+... This suite expects car module to have a separate Shard.
+
+Library Collections
+Resource ${CURDIR}/../../../libraries/CarPeople.robot
+Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Variables ${CURDIR}/../../../variables/Variables.py
+
+Suite Setup Setup
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+
+Default Tags clustering carpeople critical
+
*** Variables ***
-${CAR_ITEMS} 30
-${FOLLOWER_2NODE_START_I} 300
-${LEADER_2NODE_START_I} 200
-${MEMBER_START_TIMEOUT} 300s
-${ORIGINAL_START_I} 100
-@{SHARD_NAME_LIST} car
-${VAR_DIR} ${CURDIR}/../../../variables/carpeople/crud
+${CAR_ITEMS} 30
+${FOLLOWER_2NODE_START_I} 300
+${LEADER_2NODE_START_I} 200
+${MEMBER_START_TIMEOUT} 300s
+${ORIGINAL_START_I} 100
+@{SHARD_NAME_LIST} car
+${VAR_DIR} ${CURDIR}/../../../variables/carpeople/crud
+
*** Test Cases ***
Add_Original_Cars_On_Old_Leader_And_Verify
[Documentation] Add initial cars on car Leader.
- TemplatedRequests.Put_As_Json_Templated folder=${VAR_DIR}/cars session=${car_leader_session} iterations=${CAR_ITEMS} iter_start=${ORIGINAL_START_I}
+ TemplatedRequests.Put_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${car_leader_session}
+ ... iterations=${CAR_ITEMS}
+ ... iter_start=${ORIGINAL_START_I}
FOR ${session} IN @{ClusterManagement__session_list}
- BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session}
- ... verify=True iterations=${CAR_ITEMS} iter_start=${ORIGINAL_START_I}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 10s
+ ... 2s
+ ... TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${session}
+ ... verify=True
+ ... iterations=${CAR_ITEMS}
+ ... iter_start=${ORIGINAL_START_I}
END
Stop_Original_Car_Leader
Wait_For_New_Leader
[Documentation] Wait until new car Leader is elected.
- BuiltIn.Wait_Until_Keyword_Succeeds 30s 2s Set_Variables_For_Less_Nodes member_index_list=${car_follower_indices}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 30s
+ ... 2s
+ ... Set_Variables_For_Less_Nodes
+ ... member_index_list=${car_follower_indices}
See_Original_Cars_On_New_Leader
[Documentation] GET cars from new Leader, should be the initial ones.
- TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${new_leader_session} verify=True iterations=${CAR_ITEMS} iter_start=${ORIGINAL_START_I}
+ TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${new_leader_session}
+ ... verify=True
+ ... iterations=${CAR_ITEMS}
+ ... iter_start=${ORIGINAL_START_I}
See_Original_Cars_On_New_Followers
[Documentation] The same check on other existing member(s).
FOR ${session} IN @{new_follower_sessions}
- TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session} verify=True iterations=${CAR_ITEMS} iter_start=${ORIGINAL_START_I}
+ TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${session}
+ ... verify=True
+ ... iterations=${CAR_ITEMS}
+ ... iter_start=${ORIGINAL_START_I}
END
Delete_Original_Cars_On_New_Leader
Add_Leader_Cars_On_New_Leader
[Documentation] Add cars on the new Leader.
- TemplatedRequests.Put_As_Json_Templated folder=${VAR_DIR}/cars session=${new_leader_session} iterations=${CAR_ITEMS} iter_start=${LEADER_2NODE_START_I}
+ TemplatedRequests.Put_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${new_leader_session}
+ ... iterations=${CAR_ITEMS}
+ ... iter_start=${LEADER_2NODE_START_I}
See_Leader_Cars_On_New_Leader
[Documentation] GET cars from new Leader, should be the new ones.
- TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${new_leader_session} verify=True iterations=${CAR_ITEMS} iter_start=${LEADER_2NODE_START_I}
+ TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${new_leader_session}
+ ... verify=True
+ ... iterations=${CAR_ITEMS}
+ ... iter_start=${LEADER_2NODE_START_I}
See_Leader_Cars_On_New_Followers
[Documentation] The same check on other existing members.
FOR ${session} IN @{new_follower_sessions}
- TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session} verify=True iterations=${CAR_ITEMS} iter_start=${LEADER_2NODE_START_I}
+ TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${session}
+ ... verify=True
+ ... iterations=${CAR_ITEMS}
+ ... iter_start=${LEADER_2NODE_START_I}
END
Delete_Leader_Cars_On_New_First_Follower
Add_Follower_Cars_On_New_First_Follower
[Documentation] Add cars on the new first Follower.
- TemplatedRequests.Put_As_Json_Templated folder=${VAR_DIR}/cars session=${new_first_follower_session} iterations=${CAR_ITEMS} iter_start=${FOLLOWER_2NODE_START_I}
+ TemplatedRequests.Put_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${new_first_follower_session}
+ ... iterations=${CAR_ITEMS}
+ ... iter_start=${FOLLOWER_2NODE_START_I}
See_Folower_Cars_On_New_Leader
[Documentation] Get cars from the new Leader, should be the ones added on follower.
- TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${new_leader_session} verify=True iterations=${CAR_ITEMS} iter_start=${FOLLOWER_2NODE_START_I}
+ TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${new_leader_session}
+ ... verify=True
+ ... iterations=${CAR_ITEMS}
+ ... iter_start=${FOLLOWER_2NODE_START_I}
See_Follower_Cars_On_New_Followers
[Documentation] The same check on other existing members.
FOR ${session} IN @{new_follower_sessions}
- TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session} verify=True iterations=${CAR_ITEMS} iter_start=${FOLLOWER_2NODE_START_I}
+ TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${session}
+ ... verify=True
+ ... iterations=${CAR_ITEMS}
+ ... iter_start=${FOLLOWER_2NODE_START_I}
END
Start_Old_Car_Leader
[Documentation] Start the stopped member without deleting the persisted data.
- ClusterManagement.Start_Single_Member ${car_leader_index} wait_for_sync=True timeout=${MEMBER_START_TIMEOUT}
- BuiltIn.Wait_Until_Keyword_Succeeds 30s 2s ClusterManagement.Verify_Leader_Exists_For_Each_Shard shard_name_list=${SHARD_NAME_LIST} shard_type=config
+ ClusterManagement.Start_Single_Member
+ ... ${car_leader_index}
+ ... wait_for_sync=True
+ ... timeout=${MEMBER_START_TIMEOUT}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 30s
+ ... 2s
+ ... ClusterManagement.Verify_Leader_Exists_For_Each_Shard
+ ... shard_name_list=${SHARD_NAME_LIST}
+ ... shard_type=config
See_Folower_Cars_On_Old_Leader
[Documentation] GET cars from the restarted member, should be the ones added on follower.
- TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${car_leader_session} verify=True iterations=${CAR_ITEMS} iter_start=${FOLLOWER_2NODE_START_I}
+ TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${car_leader_session}
+ ... verify=True
+ ... iterations=${CAR_ITEMS}
+ ... iter_start=${FOLLOWER_2NODE_START_I}
Delete_Follower_Cars_On_New_Leader
[Documentation] Delete cars on the last Leader.
TemplatedRequests.Delete_Templated folder=${VAR_DIR}/cars session=${new_leader_session}
+
*** Keywords ***
Setup
[Documentation] Initialize resources, memorize car shard leader and followers.
CarPeople.Set_Variables_For_Shard shard_name=car
Set_Variables_For_Less_Nodes
- [Arguments] ${member_index_list}
[Documentation] Get current leader and followers for car shard, set additional suite variables.
- ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=car shard_type=config member_index_list=${member_index_list}
+ [Arguments] ${member_index_list}
+ ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard
+ ... shard_name=car
+ ... shard_type=config
+ ... member_index_list=${member_index_list}
${leader_session} = ClusterManagement.Resolve_Http_Session_For_Member member_index=${leader}
BuiltIn.Set_Suite_Variable \${new_leader_session} ${leader_session}
${sessions} = BuiltIn.Create_List
*** Settings ***
-Documentation Suite mixing basic operations with isolation of car Leader.
+Documentation Suite mixing basic operations with isolation of car Leader.
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
...
-... This test isolates the current leader of the "car" shard and then executes CRD
-... operations on the new leader and a new follower. The isolated member is brought back.
-... This suite uses 3 different car sets, same size but different starting ID.
+... This test isolates the current leader of the "car" shard and then executes CRD
+... operations on the new leader and a new follower. The isolated member is brought back.
+... This suite uses 3 different car sets, same size but different starting ID.
...
-... Other models and shards (people, car-people) are not accessed by this suite.
+... Other models and shards (people, car-people) are not accessed by this suite.
...
-... All data is deleted at the end of the suite.
-... This suite expects car module to have a separate Shard.
-Suite Setup Setup
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Default Tags clustering carpeople critical
-Library Collections
-Resource ${CURDIR}/../../../libraries/CarPeople.robot
-Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Variables ${CURDIR}/../../../variables/Variables.py
+... All data is deleted at the end of the suite.
+... This suite expects car module to have a separate Shard.
+
+Library Collections
+Resource ${CURDIR}/../../../libraries/CarPeople.robot
+Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Variables ${CURDIR}/../../../variables/Variables.py
+
+Suite Setup Setup
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+
+Default Tags clustering carpeople critical
+
*** Variables ***
-${CAR_ITEMS} 30
-${FOLLOWER_2NODE_START_I} 300
-${LEADER_2NODE_START_I} 200
-${MEMBER_START_TIMEOUT} 300s
-${ORIGINAL_START_I} 100
-${SHARD_TYPE} config
-${SHARD_NAME} car
-@{SHARD_NAME_LIST} ${SHARD_NAME}
-${VAR_DIR} ${CURDIR}/../../../variables/carpeople/crud
+${CAR_ITEMS} 30
+${FOLLOWER_2NODE_START_I} 300
+${LEADER_2NODE_START_I} 200
+${MEMBER_START_TIMEOUT} 300s
+${ORIGINAL_START_I} 100
+${SHARD_TYPE} config
+${SHARD_NAME} car
+@{SHARD_NAME_LIST} ${SHARD_NAME}
+${VAR_DIR} ${CURDIR}/../../../variables/carpeople/crud
+
*** Test Cases ***
Add_Original_Cars_On_Old_Leader_And_Verify
[Documentation] Add initial cars on car Leader.
- TemplatedRequests.Put_As_Json_Templated folder=${VAR_DIR}/cars session=${car_leader_session} iterations=${CAR_ITEMS} iter_start=${ORIGINAL_START_I}
+ TemplatedRequests.Put_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${car_leader_session}
+ ... iterations=${CAR_ITEMS}
+ ... iter_start=${ORIGINAL_START_I}
FOR ${session} IN @{ClusterManagement__session_list}
- BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session}
- ... verify=True iterations=${CAR_ITEMS} iter_start=${ORIGINAL_START_I}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 10s
+ ... 2s
+ ... TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${session}
+ ... verify=True
+ ... iterations=${CAR_ITEMS}
+ ... iter_start=${ORIGINAL_START_I}
END
Isolate_Original_Car_Leader
Wait_For_New_Leader
[Documentation] Wait until new car Leader is elected.
- BuiltIn.Wait_Until_Keyword_Succeeds 30s 2s ClusterManagement.Verify_Shard_Leader_Elected ${SHARD_NAME} ${SHARD_TYPE} ${True}
- ... ${car_leader_index} member_index_list=${car_follower_indices}
- CarPeople.Set_Tmp_Variables_For_Shard_For_Nodes member_index_list=${car_follower_indices} shard_name=${SHARD_NAME} shard_type=${SHARD_TYPE}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 30s
+ ... 2s
+ ... ClusterManagement.Verify_Shard_Leader_Elected
+ ... ${SHARD_NAME}
+ ... ${SHARD_TYPE}
+ ... ${True}
+ ... ${car_leader_index}
+ ... member_index_list=${car_follower_indices}
+ CarPeople.Set_Tmp_Variables_For_Shard_For_Nodes
+ ... member_index_list=${car_follower_indices}
+ ... shard_name=${SHARD_NAME}
+ ... shard_type=${SHARD_TYPE}
See_Original_Cars_On_New_Leader
[Documentation] GET cars from new Leader, should be the initial ones.
- TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${new_leader_session} verify=True iterations=${CAR_ITEMS} iter_start=${ORIGINAL_START_I}
+ TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${new_leader_session}
+ ... verify=True
+ ... iterations=${CAR_ITEMS}
+ ... iter_start=${ORIGINAL_START_I}
See_Original_Cars_On_New_Followers
[Documentation] The same check on other existing member(s).
FOR ${session} IN @{new_follower_sessions}
- TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session} verify=True iterations=${CAR_ITEMS} iter_start=${ORIGINAL_START_I}
+ TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${session}
+ ... verify=True
+ ... iterations=${CAR_ITEMS}
+ ... iter_start=${ORIGINAL_START_I}
END
Delete_Original_Cars_On_New_Leader
Add_Leader_Cars_On_New_Leader
[Documentation] Add cars on the new Leader.
- TemplatedRequests.Put_As_Json_Templated folder=${VAR_DIR}/cars session=${new_leader_session} iterations=${CAR_ITEMS} iter_start=${LEADER_2NODE_START_I}
+ TemplatedRequests.Put_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${new_leader_session}
+ ... iterations=${CAR_ITEMS}
+ ... iter_start=${LEADER_2NODE_START_I}
See_Leader_Cars_On_New_Leader
[Documentation] GET cars from new Leader, should be the new ones.
- TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${new_leader_session} verify=True iterations=${CAR_ITEMS} iter_start=${LEADER_2NODE_START_I}
+ TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${new_leader_session}
+ ... verify=True
+ ... iterations=${CAR_ITEMS}
+ ... iter_start=${LEADER_2NODE_START_I}
See_Leader_Cars_On_New_Followers
[Documentation] The same check on other existing members.
FOR ${session} IN @{new_follower_sessions}
- TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session} verify=True iterations=${CAR_ITEMS} iter_start=${LEADER_2NODE_START_I}
+ TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${session}
+ ... verify=True
+ ... iterations=${CAR_ITEMS}
+ ... iter_start=${LEADER_2NODE_START_I}
END
Delete_Leader_Cars_On_New_First_Follower
Add_Follower_Cars_On_New_First_Follower
[Documentation] Add cars on the new first Follower.
- TemplatedRequests.Put_As_Json_Templated folder=${VAR_DIR}/cars session=${new_first_follower_session} iterations=${CAR_ITEMS} iter_start=${FOLLOWER_2NODE_START_I}
+ TemplatedRequests.Put_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${new_first_follower_session}
+ ... iterations=${CAR_ITEMS}
+ ... iter_start=${FOLLOWER_2NODE_START_I}
See_Folower_Cars_On_New_Leader
[Documentation] Get cars from the new Leader, should be the ones added on follower.
- TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${new_leader_session} verify=True iterations=${CAR_ITEMS} iter_start=${FOLLOWER_2NODE_START_I}
+ TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${new_leader_session}
+ ... verify=True
+ ... iterations=${CAR_ITEMS}
+ ... iter_start=${FOLLOWER_2NODE_START_I}
See_Follower_Cars_On_New_Followers
[Documentation] The same check on other existing members.
FOR ${session} IN @{new_follower_sessions}
- TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session} verify=True iterations=${CAR_ITEMS} iter_start=${FOLLOWER_2NODE_START_I}
+ TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${session}
+ ... verify=True
+ ... iterations=${CAR_ITEMS}
+ ... iter_start=${FOLLOWER_2NODE_START_I}
END
Rejoin_Old_Car_Leader
[Documentation] Rejoin the isolated member without deleting the persisted data.
ClusterManagement.Rejoin_Member_From_List_Or_All ${car_leader_index}
- BuiltIn.Wait_Until_Keyword_Succeeds 30s 2s ClusterManagement.Verify_Leader_Exists_For_Each_Shard shard_name_list=${SHARD_NAME_LIST} shard_type=config
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 30s
+ ... 2s
+ ... ClusterManagement.Verify_Leader_Exists_For_Each_Shard
+ ... shard_name_list=${SHARD_NAME_LIST}
+ ... shard_type=config
See_Folower_Cars_On_Old_Leader
[Documentation] GET cars from the restarted member, should be the ones added on follower.
- TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${car_leader_session} verify=True iterations=${CAR_ITEMS} iter_start=${FOLLOWER_2NODE_START_I}
+ TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${car_leader_session}
+ ... verify=True
+ ... iterations=${CAR_ITEMS}
+ ... iter_start=${FOLLOWER_2NODE_START_I}
Delete_Follower_Cars_On_New_Leader
[Documentation] Delete cars on the last Leader.
TemplatedRequests.Delete_Templated folder=${VAR_DIR}/cars session=${new_leader_session}
+
*** Keywords ***
Setup
[Documentation] Initialize resources, memorize car shard leader and followers.
*** Settings ***
-Documentation Cluster suite for testing minimal and sum-minimal member population behavior.
+Documentation Cluster suite for testing minimal and sum-minimal member population behavior.
...
-... Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
...
-... This test stops majority of the followers and verifies car addition is not possible,
-... then resumes single follower (first from original list) and checks that addition works.
-... Then remaining members are brought up.
-... Leader member is always up and assumed to remain Leading during the whole suite run.
+... This test stops majority of the followers and verifies car addition is not possible,
+... then resumes single follower (first from original list) and checks that addition works.
+... Then remaining members are brought up.
+... Leader member is always up and assumed to remain Leading during the whole suite run.
...
-... TODO: Use initial data to check more operations.
-... TODO: Perhaps merge with car_failover_crud suite.
+... TODO: Use initial data to check more operations.
+... TODO: Perhaps merge with car_failover_crud suite.
...
-... Other modules and Shards (people, car-people) are not accessed by this suite.
+... Other modules and Shards (people, car-people) are not accessed by this suite.
...
-... All data is deleted at the end of the suite.
-... This suite expects car module to have a separate Shard.
-Suite Setup Setup
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Default Tags clustering carpeople critical
-Library Collections
-Resource ${CURDIR}/../../../libraries/CarPeople.robot
-Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Variables ${CURDIR}/../../../variables/Variables.py
+... All data is deleted at the end of the suite.
+... This suite expects car module to have a separate Shard.
+
+Library Collections
+Resource ${CURDIR}/../../../libraries/CarPeople.robot
+Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Variables ${CURDIR}/../../../variables/Variables.py
+
+Suite Setup Setup
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+
+Default Tags clustering carpeople critical
+
*** Variables ***
-${CAR_ITEMS} 50
-${MINORITY_START_I} 300
-${MAJORITY_START_I} 200
-${MEMBER_START_TIMEOUT} 300s
-@{SHARD_NAME_LIST} car
-${VAR_DIR} ${CURDIR}/../../../variables/carpeople/crud
-${CLUSTER_DIR} ${CURDIR}/../../../variables/clustering
+${CAR_ITEMS} 50
+${MINORITY_START_I} 300
+${MAJORITY_START_I} 200
+${MEMBER_START_TIMEOUT} 300s
+@{SHARD_NAME_LIST} car
+${VAR_DIR} ${CURDIR}/../../../variables/carpeople/crud
+${CLUSTER_DIR} ${CURDIR}/../../../variables/clustering
+
*** Test Cases ***
Stop_Majority_Of_The_Followers
... Mark most of stopped members as explicitly down, to allow the surviving leader make progress.
ClusterManagement.Stop_Members_From_List_Or_All member_index_list=${list_of_stopping} confirm=True
FOR ${index} IN @{list_of_reviving}
- ${data} OperatingSystem.Get File ${CLUSTER_DIR}/member_down.json
+ ${data} = OperatingSystem.Get File ${CLUSTER_DIR}/member_down.json
${member_ip} = Collections.Get_From_Dictionary ${ClusterManagement__index_to_ip_mapping} ${index}
- ${data} String.Replace String ${data} {member_ip} ${member_ip}
- TemplatedRequests.Post_To_Uri uri=jolokia data=${data} content_type=${HEADERS} accept=${ACCEPT_EMPTY} session=${car_leader_session}
+ ${data} = String.Replace String ${data} {member_ip} ${member_ip}
+ TemplatedRequests.Post_To_Uri
+ ... uri=jolokia
+ ... data=${data}
+ ... content_type=${HEADERS}
+ ... accept=${ACCEPT_EMPTY}
+ ... session=${car_leader_session}
END
Attempt_To_Add_Cars_To_Leader
[Documentation] Adding cars should fail, as majority of Followers are down.
- ${status} ${message} = BuiltIn.Run_Keyword_And_Ignore_Error TemplatedRequests.Put_As_Json_Templated folder=${VAR_DIR}/cars session=${car_leader_session} iterations=${CAR_ITEMS}
+ ${status} ${message} = BuiltIn.Run_Keyword_And_Ignore_Error
+ ... TemplatedRequests.Put_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${car_leader_session}
+ ... iterations=${CAR_ITEMS}
... iter_start=${MINORITY_START_I}
# TODO: Is there a specific status and mesage to require in this scenario?
# Previously it was 500, now the restconf call simply times out.
Start_Tipping_Follower
[Documentation] Start one Follower member without persisted data.
- ClusterManagement.Start_Members_From_List_Or_All member_index_list=${list_of_tipping} wait_for_sync=True timeout=${MEMBER_START_TIMEOUT}
- BuiltIn.Wait_Until_Keyword_Succeeds 30s 2s ClusterManagement.Verify_Leader_Exists_For_Each_Shard shard_name_list=${SHARD_NAME_LIST} shard_type=config member_index_list=${list_of_majority}
+ ClusterManagement.Start_Members_From_List_Or_All
+ ... member_index_list=${list_of_tipping}
+ ... wait_for_sync=True
+ ... timeout=${MEMBER_START_TIMEOUT}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 30s
+ ... 2s
+ ... ClusterManagement.Verify_Leader_Exists_For_Each_Shard
+ ... shard_name_list=${SHARD_NAME_LIST}
+ ... shard_type=config
+ ... member_index_list=${list_of_majority}
Add_Cars_On_Tipping_Follower
[Documentation] Add cars on the tipping Follower.
- TemplatedRequests.Put_As_Json_Templated folder=${VAR_DIR}/cars session=${car_first_follower_session} iterations=${CAR_ITEMS} iter_start=${MAJORITY_START_I}
+ TemplatedRequests.Put_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${car_first_follower_session}
+ ... iterations=${CAR_ITEMS}
+ ... iter_start=${MAJORITY_START_I}
See_Cars_On_Existing_Members
[Documentation] On each up member: GET cars, should match the ones added on tipping Follower.
FOR ${session} IN @{list_of_majority}
- TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session} verify=True iterations=${CAR_ITEMS} iter_start=${MAJORITY_START_I}
+ TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${session}
+ ... verify=True
+ ... iterations=${CAR_ITEMS}
+ ... iter_start=${MAJORITY_START_I}
END
Start_Other_Followers
[Documentation] Start other followers without persisted data.
- ClusterManagement.Start_Members_From_List_Or_All member_index_list=${list_of_reviving} wait_for_sync=True timeout=${MEMBER_START_TIMEOUT}
- BuiltIn.Wait_Until_Keyword_Succeeds 30s 2s ClusterManagement.Verify_Leader_Exists_For_Each_Shard shard_name_list=${SHARD_NAME_LIST} shard_type=config
+ ClusterManagement.Start_Members_From_List_Or_All
+ ... member_index_list=${list_of_reviving}
+ ... wait_for_sync=True
+ ... timeout=${MEMBER_START_TIMEOUT}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 30s
+ ... 2s
+ ... ClusterManagement.Verify_Leader_Exists_For_Each_Shard
+ ... shard_name_list=${SHARD_NAME_LIST}
+ ... shard_type=config
See_Cars_On_New_Follower_Leader
[Documentation] GET cars from a new follower to see that the current state was replicated.
- TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${car_last_follower_session} verify=True iterations=${CAR_ITEMS} iter_start=${MAJORITY_START_I}
+ TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${car_last_follower_session}
+ ... verify=True
+ ... iterations=${CAR_ITEMS}
+ ... iter_start=${MAJORITY_START_I}
Delete_Cars_On_Leader
[Documentation] Delete cars on Leader.
TemplatedRequests.Delete_Templated folder=${VAR_DIR}/cars session=${car_leader_session}
+
*** Keywords ***
Setup
[Documentation] Initialize resources, memorize shard leaders, pre-compute member lists.
BuiltIn.Set_Suite_Variable \${list_of_majority} ${majority_list}
${tipping_list} = Collections.Get_Slice_From_List ${majority_follower_list} 0 1
BuiltIn.Set_Suite_Variable \${list_of_tipping} ${tipping_list}
- ${revive_list} = Collections.Get_Slice_From_List ${car_follower_indices} ${half_followers} ${number_followers}
+ ${revive_list} = Collections.Get_Slice_From_List
+ ... ${car_follower_indices}
+ ... ${half_followers}
+ ... ${number_followers}
BuiltIn.Set_Suite_Variable \${list_of_reviving} ${revive_list}
${stop_list} = Collections.Combine_Lists ${tipping_list} ${revive_list}
BuiltIn.Set_Suite_Variable \${list_of_stopping} ${stop_list}
*** Settings ***
-Documentation This test restarts all controllers to verify recovery of car data from persistence.
+Documentation This test restarts all controllers to verify recovery of car data from persistence.
...
-... Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
...
-... Other models and shards (people, car-people) are not accessed by this suite.
+... Other models and shards (people, car-people) are not accessed by this suite.
...
-... All data is deleted at the end of the suite.
-... This suite expects car module to have a separate Shard.
-Suite Setup Setup
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Default Tags clustering carpeople critical
-Library Collections
-Resource ${CURDIR}/../../../libraries/CarPeople.robot
-Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Variables ${CURDIR}/../../../variables/Variables.py
+... All data is deleted at the end of the suite.
+... This suite expects car module to have a separate Shard.
+
+Library Collections
+Resource ${CURDIR}/../../../libraries/CarPeople.robot
+Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Variables ${CURDIR}/../../../variables/Variables.py
+
+Suite Setup Setup
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+
+Default Tags clustering carpeople critical
+
*** Variables ***
-${CAR_ITEMS} 50
-${MEMBER_START_TIMEOUT} 300s
-${VAR_DIR} ${CURDIR}/../../../variables/carpeople/crud
+${CAR_ITEMS} 50
+${MEMBER_START_TIMEOUT} 300s
+${VAR_DIR} ${CURDIR}/../../../variables/carpeople/crud
+
*** Test Cases ***
Add_Cars_On_Leader_And_Verify
[Documentation] Single big PUT to datastore to add cars to car Leader.
- TemplatedRequests.Put_As_Json_Templated folder=${VAR_DIR}/cars session=${car_leader_session} iterations=${CAR_ITEMS}
+ TemplatedRequests.Put_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${car_leader_session}
+ ... iterations=${CAR_ITEMS}
FOR ${session} IN @{ClusterManagement__session_list}
- BuiltIn.Wait_Until_Keyword_Succeeds 10s 2s TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session}
- ... verify=True iterations=${CAR_ITEMS}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 10s
+ ... 2s
+ ... TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${session}
+ ... verify=True
+ ... iterations=${CAR_ITEMS}
END
Stop_All_Members
See_Cars_On_Leader
[Documentation] GET cars from Leader, should match the PUT data.
- TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${car_leader_session} verify=True iterations=${CAR_ITEMS}
+ TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${car_leader_session}
+ ... verify=True
+ ... iterations=${CAR_ITEMS}
See_Cars_On_Followers
[Documentation] The same check on other members.
FOR ${session} IN @{car_follower_sessions}
- TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session} verify=True iterations=${CAR_ITEMS}
+ TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${session}
+ ... verify=True
+ ... iterations=${CAR_ITEMS}
END
Delete_Cars_On_Leader
[Documentation] Delete cars on the new Leader.
TemplatedRequests.Delete_Templated folder=${VAR_DIR}/cars session=${car_leader_session}
+
*** Keywords ***
Setup
[Documentation] Initialize resources, memorize car shard leader and followers.
*** Settings ***
-Documentation Suite for performing basic car/people CRUD operations on leaders and followers.
+Documentation Suite for performing basic car/people CRUD operations on leaders and followers.
...
-... Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
...
-... More precisely, Update operation is not executed, but some operations
-... are using specific RPCs which goes beyond "basic CRUD".
+... More precisely, Update operation is not executed, but some operations
+... are using specific RPCs which goes beyond "basic CRUD".
...
-... Cars are added by one big PUT to datastore on car Leader.
-... People are added in a loop with add-person RPC on a people Follower.
-... Cars are bought by chunks on each member, by loop with buy-car RPC.
+... Cars are added by one big PUT to datastore on car Leader.
+... People are added in a loop with add-person RPC on a people Follower.
+... Cars are bought by chunks on each member, by loop with buy-car RPC.
...
-... All data is deleted at the end of the suite.
-... This suite expects car, people and car-people modules to have separate Shards.
-Suite Setup Setup
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Default Tags clustering carpeople critical
-Library Collections
-Resource ${CURDIR}/../../../libraries/CarPeople.robot
-Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Variables ${CURDIR}/../../../variables/Variables.py
+... All data is deleted at the end of the suite.
+... This suite expects car, people and car-people modules to have separate Shards.
+
+Library Collections
+Resource ${CURDIR}/../../../libraries/CarPeople.robot
+Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Variables ${CURDIR}/../../../variables/Variables.py
+
+Suite Setup Setup
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+
+Default Tags clustering carpeople critical
+
*** Variables ***
-${CARPEOPLE_ITEMS} ${30}
-${VAR_DIR} ${CURDIR}/../../../variables/carpeople/crud
+${CARPEOPLE_ITEMS} ${30}
+${VAR_DIR} ${CURDIR}/../../../variables/carpeople/crud
+
*** Test Cases ***
Add_Cars_To_Leader
[Documentation] Add ${CARPEOPLE_ITEMS} cars to car Leader by one big PUT.
- TemplatedRequests.Put_As_Json_Templated folder=${VAR_DIR}/cars session=${car_leader_session} iterations=${CARPEOPLE_ITEMS}
+ TemplatedRequests.Put_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${car_leader_session}
+ ... iterations=${CARPEOPLE_ITEMS}
See_Added_Cars_On_Leader
[Documentation] GET response from Leader should match the PUT data.
- TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${car_leader_session} verify=True iterations=${CARPEOPLE_ITEMS}
+ TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${car_leader_session}
+ ... verify=True
+ ... iterations=${CARPEOPLE_ITEMS}
See_Added_Cars_On_Followers
[Documentation] The same check on other members.
FOR ${session} IN @{car_follower_sessions}
- TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/cars session=${session} verify=True iterations=${CARPEOPLE_ITEMS}
+ TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/cars
+ ... session=${session}
+ ... verify=True
+ ... iterations=${CARPEOPLE_ITEMS}
END
Add_People_To_First_Follower
See_Added_People_On_Leader
[Documentation] GET response from Leader should match the added people.
- TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/people session=${people_leader_session} verify=True iterations=${CARPEOPLE_ITEMS}
+ TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/people
+ ... session=${people_leader_session}
+ ... verify=True
+ ... iterations=${CARPEOPLE_ITEMS}
See_Added_People_On_Followers
[Documentation] The same check on other members.
FOR ${session} IN @{people_follower_sessions}
- TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/people session=${session} verify=True iterations=${CARPEOPLE_ITEMS}
+ TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/people
+ ... session=${session}
+ ... verify=True
+ ... iterations=${CARPEOPLE_ITEMS}
END
Buy_Cars_On_Leader
[Documentation] Buy some cars on car-people Leader, loop of buy-car, ending segment of IDs.
# Cars are numbered, leader gets chunk at the end, as that is few keypresses shorter.
${start_id} = BuiltIn.Evaluate (${NUM_ODL_SYSTEM} - 1) * ${items_per_follower} + 1
- CarPeople.Buy_Several_Cars session=${car-people_leader_session} iterations=${items_per_leader} iter_start=${start_id}
+ CarPeople.Buy_Several_Cars
+ ... session=${car-people_leader_session}
+ ... iterations=${items_per_leader}
+ ... iter_start=${start_id}
Buy_Cars_On_Followers
[Documentation] On each Follower buy corresponding ID segment of cars in buy-car loop.
See_Added_CarPeople_On_Leader
[Documentation] GET car-person mappings from Leader to see all entries.
- TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${car-people_leader_session} verify=True iterations=${CARPEOPLE_ITEMS}
+ TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/car-people
+ ... session=${car-people_leader_session}
+ ... verify=True
+ ... iterations=${CARPEOPLE_ITEMS}
See_Added_CarPeople_On_Followers
[Documentation] The same check on other members.
FOR ${session} IN @{car-people_follower_sessions}
- TemplatedRequests.Get_As_Json_Templated folder=${VAR_DIR}/car-people session=${session} verify=True iterations=${CARPEOPLE_ITEMS}
+ TemplatedRequests.Get_As_Json_Templated
+ ... folder=${VAR_DIR}/car-people
+ ... session=${session}
+ ... verify=True
+ ... iterations=${CARPEOPLE_ITEMS}
END
Delete_All_CarPeople_On_Leader
[Documentation] DELETE cars container. No verification beyond http status.
TemplatedRequests.Delete_Templated folder=${VAR_DIR}/cars session=${car_leader_session}
+
*** Keywords ***
Setup
[Documentation] Initialize resources, memorize shard leaders, compute item distribution.
*** Settings ***
-Documentation This test waits until cluster appears to be ready.
+Documentation This test waits until cluster appears to be ready.
...
-... Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
...
-... Intended use is at a start of testplan, so that suites can assume cluster works.
+... Intended use is at a start of testplan, so that suites can assume cluster works.
...
-... This suite expects car, people and car-people modules to have separate Shards.
-Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Default Tags clustering carpeople critical
-Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+... This suite expects car, people and car-people modules to have separate Shards.
+
+Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+
+Default Tags clustering carpeople critical
+
*** Variables ***
-${CLUSTER_BOOTUP_SYNC_TIMEOUT} 180s
-@{SHARD_NAME_LIST} car people car-people
+${CLUSTER_BOOTUP_SYNC_TIMEOUT} 180s
+@{SHARD_NAME_LIST} car people car-people
+
*** Test Cases ***
Wait_For_Sync_And_Shards
[Documentation] Repeatedly check for cluster sync status and Shard Leaders, fail when timeout is exceeded.
BuiltIn.Wait_Until_Keyword_Succeeds ${CLUSTER_BOOTUP_SYNC_TIMEOUT} 10s Check_Sync_And_Shards
+
*** Keywords ***
Check_Sync_And_Shards
ClusterManagement.Check_Cluster_Is_In_Sync
*** Settings ***
-Documentation Suite for performing member isolation and rejoin, we do with entity-ownership leader.
-Suite Setup Setup
-Suite Teardown Teardown
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Default Tags clustering carpeople critical
-Library Collections
-Resource ${CURDIR}/../../../libraries/CarPeople.robot
-Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Variables ${CURDIR}/../../../variables/Variables.py
+Documentation Suite for performing member isolation and rejoin, we do with entity-ownership leader.
+
+Library Collections
+Resource ${CURDIR}/../../../libraries/CarPeople.robot
+Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Variables ${CURDIR}/../../../variables/Variables.py
+
+Suite Setup Setup
+Suite Teardown Teardown
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+
+Default Tags clustering carpeople critical
+
*** Variables ***
-@{SHARD_OPER_LIST} car people car-people inventory topology default toaster
-... entity-ownership
-@{SHARD_CONF_LIST} car people car-people inventory topology default toaster
+@{SHARD_OPER_LIST} car people car-people inventory topology default toaster
+... entity-ownership
+@{SHARD_CONF_LIST} car people car-people inventory topology default toaster
+
*** Test Cases ***
Check All Shards Before Isolate
[Documentation] Check all shards in controller.
- BuiltIn.Wait_Until_Keyword_Succeeds 30s 2s ClusterManagement.Verify_Leader_Exists_For_Each_Shard shard_name_list=${SHARD_OPER_LIST} shard_type=operational
- BuiltIn.Wait_Until_Keyword_Succeeds 30s 2s ClusterManagement.Verify_Leader_Exists_For_Each_Shard shard_name_list=${SHARD_CONF_LIST} shard_type=config
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 30s
+ ... 2s
+ ... ClusterManagement.Verify_Leader_Exists_For_Each_Shard
+ ... shard_name_list=${SHARD_OPER_LIST}
+ ... shard_type=operational
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 30s
+ ... 2s
+ ... ClusterManagement.Verify_Leader_Exists_For_Each_Shard
+ ... shard_name_list=${SHARD_CONF_LIST}
+ ... shard_type=config
Isolate Entity Leader
[Documentation] Isolate the entity-ownership Leader to cause a new leader to get elected.
Check All Shards After Isolate
[Documentation] Check all shards in controller.
- BuiltIn.Wait_Until_Keyword_Succeeds 30s 2s ClusterManagement.Verify_Leader_Exists_For_Each_Shard shard_name_list=${SHARD_OPER_LIST} shard_type=operational member_index_list=${entity-ownership_follower_indices}
- BuiltIn.Wait_Until_Keyword_Succeeds 30s 2s ClusterManagement.Verify_Leader_Exists_For_Each_Shard shard_name_list=${SHARD_CONF_LIST} shard_type=config member_index_list=${entity-ownership_follower_indices}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 30s
+ ... 2s
+ ... ClusterManagement.Verify_Leader_Exists_For_Each_Shard
+ ... shard_name_list=${SHARD_OPER_LIST}
+ ... shard_type=operational
+ ... member_index_list=${entity-ownership_follower_indices}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 30s
+ ... 2s
+ ... ClusterManagement.Verify_Leader_Exists_For_Each_Shard
+ ... shard_name_list=${SHARD_CONF_LIST}
+ ... shard_type=config
+ ... member_index_list=${entity-ownership_follower_indices}
Rejoin Entity Leader
[Documentation] Rejoin the entity-ownership Leader.
Check All Shards After Rejoin
[Documentation] Check all shards in controller.
- BuiltIn.Wait_Until_Keyword_Succeeds 30s 2s ClusterManagement.Verify_Leader_Exists_For_Each_Shard shard_name_list=${SHARD_OPER_LIST} shard_type=operational
- BuiltIn.Wait_Until_Keyword_Succeeds 30s 2s ClusterManagement.Verify_Leader_Exists_For_Each_Shard shard_name_list=${SHARD_CONF_LIST} shard_type=config
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 30s
+ ... 2s
+ ... ClusterManagement.Verify_Leader_Exists_For_Each_Shard
+ ... shard_name_list=${SHARD_OPER_LIST}
+ ... shard_type=operational
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 30s
+ ... 2s
+ ... ClusterManagement.Verify_Leader_Exists_For_Each_Shard
+ ... shard_name_list=${SHARD_CONF_LIST}
+ ... shard_type=config
+
*** Keywords ***
Setup
*** Settings ***
-Documentation Test suite for Longevity test of cluster datastore
-Library ../../../../libraries/CrudLibrary.py
+Documentation Test suite for Longevity test of cluster datastore
+
+Library ../../../../libraries/CrudLibrary.py
-*** Variables ***
*** Test Cases ***
Run Tests in Loop for Specified Time
*** Settings ***
-Documentation Test suite for Longevity test of cluster datastore
-Suite Setup Start Suite
-Suite Teardown Stop Suite
-Library SSHLibrary
+Documentation Test suite for Longevity test of cluster datastore
+
+Library SSHLibrary
+
+Suite Setup Start Suite
+Suite Teardown Stop Suite
+
*** Keywords ***
Start Suite
Stop Suite
-
*** Settings ***
-Documentation Test suite for NETCONF client
-Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-Library Collections
-Library OperatingSystem
-Library String
-Library RequestsLibrary
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
+Documentation Test suite for NETCONF client
+
+Library Collections
+Library OperatingSystem
+Library String
+Library RequestsLibrary
+Library ../../../libraries/Common.py
+Variables ../../../variables/Variables.py
+
+Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
+Suite Teardown Delete All Sessions
+
*** Variables ***
-${NETOPEER} ${TOOLS_SYSTEM_IP}
-${NETOPEER_USER} ${TOOLS_SYSTEM_USER}
-${FILE} ${CURDIR}/../../../variables/xmls/netconf.xml
-${REST_CONT_CONF} /restconf/config/network-topology:network-topology/topology/topology-netconf
-${REST_CONT_OPER} /restconf/operational/network-topology:network-topology/topology/topology-netconf
-${REST_NTPR_CONF} node/controller-config/yang-ext:mount/config:modules
-${REST_NTPR_MOUNT} node/netopeer/yang-ext:mount/
+${NETOPEER} ${TOOLS_SYSTEM_IP}
+${NETOPEER_USER} ${TOOLS_SYSTEM_USER}
+${FILE} ${CURDIR}/../../../variables/xmls/netconf.xml
+${REST_CONT_CONF} /restconf/config/network-topology:network-topology/topology/topology-netconf
+${REST_CONT_OPER} /restconf/operational/network-topology:network-topology/topology/topology-netconf
+${REST_NTPR_CONF} node/controller-config/yang-ext:mount/config:modules
+${REST_NTPR_MOUNT} node/netopeer/yang-ext:mount/
+
*** Test Cases ***
Add NetConf device
Should Contain ${resp.content} statistics
Should Contain ${resp.content} datastores
+
*** Keywords ***
Get Inventory
${resp} Get Request session ${REST_CONT_OPER}/node/netopeer
*** Settings ***
-Documentation Test for measuring execution time of MD-SAL DataStore operations.
+Documentation Test for measuring execution time of MD-SAL DataStore operations.
...
-... Copyright (c) 2015-2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2015-2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... This test suite requires odl-restconf and odl-clustering-test-app modules.
-... The script cluster_rest_script.py is used for generating requests for
-... operations on people, car and car-people DataStore test models.
-... (see the https://wiki.opendaylight.org/view/MD-SAL_Clustering_Test_Plan)
+... This test suite requires odl-restconf and odl-clustering-test-app modules.
+... The script cluster_rest_script.py is used for generating requests for
+... operations on people, car and car-people DataStore test models.
+... (see the https://wiki.opendaylight.org/view/MD-SAL_Clustering_Test_Plan)
...
-... TODO: Decide whether keyword names should contain spaces or underscores.
-Suite Setup Start Suite
-Suite Teardown Stop Suite
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Library RequestsLibrary
-Library SSHLibrary
-Library XML
-Resource ../../../libraries/RemoteBash.robot
-Resource ../../../libraries/SetupUtils.robot
-Resource ../../../libraries/SSHKeywords.robot
-Resource ../../../libraries/TemplatedRequests.robot
-Resource ../../../libraries/Utils.robot
-Variables ../../../variables/Variables.py
+... TODO: Decide whether keyword names should contain spaces or underscores.
+
+Library RequestsLibrary
+Library SSHLibrary
+Library XML
+Resource ../../../libraries/RemoteBash.robot
+Resource ../../../libraries/SetupUtils.robot
+Resource ../../../libraries/SSHKeywords.robot
+Resource ../../../libraries/TemplatedRequests.robot
+Resource ../../../libraries/Utils.robot
+Variables ../../../variables/Variables.py
+
+Suite Setup Start Suite
+Suite Teardown Stop Suite
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
*** Variables ***
-${ITEM_COUNT} ${10000}
-${ITEM_BATCH} ${10000}
-${PROCEDURE_TIMEOUT} 11m
-${addcarcmd} python cluster_rest_script.py --host ${ODL_SYSTEM_IP} --port ${RESTCONFPORT} add --itemtype car --itemcount ${ITEM_COUNT} --ipr ${ITEM_BATCH}
-${addpeoplecmd} python cluster_rest_script.py --host ${ODL_SYSTEM_IP} --port ${RESTCONFPORT} add-rpc --itemtype people --itemcount ${ITEM_COUNT} --threads 5
-${purchasecmd} python cluster_rest_script.py --host ${ODL_SYSTEM_IP} --port ${RESTCONFPORT} add-rpc --itemtype car-people --itemcount ${ITEM_COUNT} --threads 5
-${carurl} /restconf/config/car:cars
-${peopleurl} /restconf/config/people:people
-${carpeopleurl} /restconf/config/car-people:car-people
-${CONTROLLER_LOG_LEVEL} INFO
-${TOOL_OPTIONS} ${EMPTY}
+${ITEM_COUNT} ${10000}
+${ITEM_BATCH} ${10000}
+${PROCEDURE_TIMEOUT} 11m
+${addcarcmd}
+... python cluster_rest_script.py --host ${ODL_SYSTEM_IP} --port ${RESTCONFPORT} add --itemtype car --itemcount ${ITEM_COUNT} --ipr ${ITEM_BATCH}
+${addpeoplecmd}
+... python cluster_rest_script.py --host ${ODL_SYSTEM_IP} --port ${RESTCONFPORT} add-rpc --itemtype people --itemcount ${ITEM_COUNT} --threads 5
+${purchasecmd}
+... python cluster_rest_script.py --host ${ODL_SYSTEM_IP} --port ${RESTCONFPORT} add-rpc --itemtype car-people --itemcount ${ITEM_COUNT} --threads 5
+${carurl} /restconf/config/car:cars
+${peopleurl} /restconf/config/people:people
+${carpeopleurl} /restconf/config/car-people:car-people
+${CONTROLLER_LOG_LEVEL} INFO
+${TOOL_OPTIONS} ${EMPTY}
+
*** Test Cases ***
Add Cars
${rsp}= RequestsLibrary.Get Request session ${carpeopleurl}
Should Contain ${DELETED_STATUS_CODES} ${rsp.status_code}
+
*** Keywords ***
Start Suite
[Documentation] Suite setup keyword.
SetupUtils.Setup_Utils_For_Setup_And_Teardown
KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${CONTROLLER_LOG_LEVEL}
- ${mininet_conn_id}= SSHLibrary.Open Connection ${TOOLS_SYSTEM_IP} prompt=${TOOLS_SYSTEM_PROMPT} timeout=6s
+ ${mininet_conn_id}= SSHLibrary.Open Connection
+ ... ${TOOLS_SYSTEM_IP}
+ ... prompt=${TOOLS_SYSTEM_PROMPT}
+ ... timeout=6s
Builtin.Set Suite Variable ${mininet_conn_id}
SSHKeywords.Flexible Mininet Login ${TOOLS_SYSTEM_USER}
SSHLibrary.Put File ${CURDIR}/../../../../tools/odl-mdsal-clustering-tests/scripts/cluster_rest_script.py .
RequestsLibrary.Delete All Sessions
Start_Tool
- [Arguments] ${command} ${tool_opt}
[Documentation] Start the tool ${command} ${tool_opt}
+ [Arguments] ${command} ${tool_opt}
BuiltIn.Log ${command}
${output}= SSHLibrary.Write ${command} ${tool_opt}
BuiltIn.Log ${output}
Wait_Until_Tool_Finish
- [Arguments] ${timeout}
[Documentation] Wait ${timeout} for the tool exit, return the printed output.
- BuiltIn.Run Keyword And Return BuiltIn.Wait Until Keyword Succeeds ${timeout} 1s SSHLibrary.Read Until Prompt
+ [Arguments] ${timeout}
+ BuiltIn.Run Keyword And Return
+ ... BuiltIn.Wait Until Keyword Succeeds
+ ... ${timeout}
+ ... 1s
+ ... SSHLibrary.Read Until Prompt
Purchase Is Completed
- [Arguments] ${item_count}
[Documentation] Check purchase of ${item_count} is completed.
+ [Arguments] ${item_count}
${rsp}= RequestsLibrary.Get Request session ${carpeopleurl} headers=${ACCEPT_XML}
${count}= XML.Get Element Count ${rsp.content} xpath=car-person
Should Be Equal As Numbers ${count} ${item_count}
BuiltIn.Log ${output}
Store_File_To_Workspace
- [Arguments] ${source_file_name} ${target_file_name}
[Documentation] Store the ${source_file_name} to the workspace as ${target_file_name}.
+ [Arguments] ${source_file_name} ${target_file_name}
${output_log}= SSHLibrary.Execute_Command cat ${source_file_name}
BuiltIn.Log ${output_log}
Create File ${target_file_name} ${output_log}
*** Settings ***
-Documentation Basic library verification suite, handling cars/people in 1-node setup.
+Documentation Basic library verification suite, handling cars/people in 1-node setup.
...
-... Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... This is a lightweight and stripped-down functional analogue of performance suite.
-... Intention is to use this as a verify suite for changes in TemplatedRequests resource.
-Suite Setup Start_Suite
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Variables ${CURDIR}/../../../variables/Variables.py
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
+... This is a lightweight and stripped-down functional analogue of performance suite.
+... Intention is to use this as a verify suite for changes in TemplatedRequests resource.
+
+Variables ${CURDIR}/../../../variables/Variables.py
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
+
+Suite Setup Start_Suite
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
*** Variables ***
-${VAR_BASE} ${CURDIR}/../../../variables/carpeople/libtest
-${BULK_SIZE} 2
-${TIMEOUT_BUG_4220} 60s
+${VAR_BASE} ${CURDIR}/../../../variables/carpeople/libtest
+${BULK_SIZE} 2
+${TIMEOUT_BUG_4220} 60s
+
*** Test Cases ***
Wait_For_Rpcs
TemplatedRequests.Delete_Templated folder=${VAR_BASE}/people
# TODO: Add specific error check on Get attempt.
+
*** Keywords ***
Start_Suite
[Documentation] Suite setup keyword
Check_Rpc_Readiness
[Documentation] Issue invalid RPC requests and assert appropriate http status code
# So far only buy-car is checked, but other RPCs such as add-car may be added later.
- ${status} ${message} = BuiltIn.Run_Keyword_And_Ignore_Error TemplatedRequests.Post_As_Json_To_Uri uri=restconf/operations/car-purchase:buy-car data={"input":{}}
+ ${status} ${message} = BuiltIn.Run_Keyword_And_Ignore_Error
+ ... TemplatedRequests.Post_As_Json_To_Uri
+ ... uri=restconf/operations/car-purchase:buy-car
+ ... data={"input":{}}
# TODO: Create template directory for this?
BuiltIn.Should_Not_Contain ${message} '50
*** Settings ***
-Documentation Test for measuring execution time of MD-SAL DataStore operations in cluster.
+Documentation Test for measuring execution time of MD-SAL DataStore operations in cluster.
...
-... Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... This test suite requires odl-restconf and odl-clustering-test-app modules.
-... The script cluster_rest_script.py is used for generating requests for
-... operations on people, car and car-people DataStore test models.
-... (see the https://wiki.opendaylight.org/view/MD-SAL_Clustering_Test_Plan)
+... This test suite requires odl-restconf and odl-clustering-test-app modules.
+... The script cluster_rest_script.py is used for generating requests for
+... operations on people, car and car-people DataStore test models.
+... (see the https://wiki.opendaylight.org/view/MD-SAL_Clustering_Test_Plan)
...
-... Reported bugs:
-... https://bugs.opendaylight.org/show_bug.cgi?id=4220
-Suite Setup Start Suite
-Suite Teardown Stop Suite
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Library RequestsLibrary
-Library SSHLibrary
-Library XML
-Resource ../../../libraries/CarPeople.robot
-Resource ../../../libraries/ClusterManagement.robot
-Resource ../../../libraries/RemoteBash.robot
-Resource ../../../libraries/SetupUtils.robot
-Resource ../../../libraries/SSHKeywords.robot
-Resource ../../../libraries/TemplatedRequests.robot
-Resource ../../../libraries/Utils.robot
-Variables ../../../variables/Variables.py
+... Reported bugs:
+... https://bugs.opendaylight.org/show_bug.cgi?id=4220
+
+Library RequestsLibrary
+Library SSHLibrary
+Library XML
+Resource ../../../libraries/CarPeople.robot
+Resource ../../../libraries/ClusterManagement.robot
+Resource ../../../libraries/RemoteBash.robot
+Resource ../../../libraries/SetupUtils.robot
+Resource ../../../libraries/SSHKeywords.robot
+Resource ../../../libraries/TemplatedRequests.robot
+Resource ../../../libraries/Utils.robot
+Variables ../../../variables/Variables.py
+
+Suite Setup Start Suite
+Suite Teardown Stop Suite
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+
*** Variables ***
-${ITEM_COUNT} ${10000}
-${ITEM_BATCH} ${10000}
-${PROCEDURE_TIMEOUT} 5m
-${threads} 6 # threads are assigned to cluster nodes in round robin way
-${addcarcmd} python cluster_rest_script.py --port ${RESTCONFPORT} add --itemtype car --itemcount ${ITEM_COUNT} --ipr ${ITEM_BATCH}
-${addpeoplecmd} python cluster_rest_script.py --port ${RESTCONFPORT} add-rpc --itemtype people --itemcount ${ITEM_COUNT} --threads 6
-${purchasecmd} python cluster_rest_script.py --port ${RESTCONFPORT} add-rpc --itemtype car-people --itemcount ${ITEM_COUNT} --threads 6
-${carurl} /restconf/config/car:cars
-${peopleurl} /restconf/config/people:people
-${carpeopleurl} /restconf/config/car-people:car-people
-${CONTROLLER_LOG_LEVEL} INFO
-${TOOL_OPTIONS} ${EMPTY}
+${ITEM_COUNT} ${10000}
+${ITEM_BATCH} ${10000}
+${PROCEDURE_TIMEOUT} 5m
+${threads} 6 # threads are assigned to cluster nodes in round robin way
+${addcarcmd}
+... python cluster_rest_script.py --port ${RESTCONFPORT} add --itemtype car --itemcount ${ITEM_COUNT} --ipr ${ITEM_BATCH}
+${addpeoplecmd}
+... python cluster_rest_script.py --port ${RESTCONFPORT} add-rpc --itemtype people --itemcount ${ITEM_COUNT} --threads 6
+${purchasecmd}
+... python cluster_rest_script.py --port ${RESTCONFPORT} add-rpc --itemtype car-people --itemcount ${ITEM_COUNT} --threads 6
+${carurl} /restconf/config/car:cars
+${peopleurl} /restconf/config/people:people
+${carpeopleurl} /restconf/config/car-people:car-people
+${CONTROLLER_LOG_LEVEL} INFO
+${TOOL_OPTIONS} ${EMPTY}
+
*** Test Cases ***
Add Cars
${rsp}= RequestsLibrary.Get Request ${car_leader_session} ${carpeopleurl}
Should Contain ${DELETED_STATUS_CODES} ${rsp.status_code}
+
*** Keywords ***
Start Suite
[Documentation] Suite setup keyword
ClusterManagement.ClusterManagement_Setup
CarPeople.Set_Variables_For_Shard shard_name=car
KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${CONTROLLER_LOG_LEVEL}
- ${mininet_conn_id}= SSHLibrary.Open Connection ${TOOLS_SYSTEM_IP} prompt=${DEFAULT_LINUX_PROMPT} timeout=6s
+ ${mininet_conn_id}= SSHLibrary.Open Connection
+ ... ${TOOLS_SYSTEM_IP}
+ ... prompt=${DEFAULT_LINUX_PROMPT}
+ ... timeout=6s
Builtin.Set Suite Variable ${mininet_conn_id}
SSHKeywords.Flexible Mininet Login ${TOOLS_SYSTEM_USER}
SSHLibrary.Put File ${CURDIR}/../../../../tools/odl-mdsal-clustering-tests/scripts/cluster_rest_script.py .
RequestsLibrary.Delete All Sessions
Start_Tool
- [Arguments] ${command} ${tool_opt}
[Documentation] Start the tool ${command} ${tool_opt}
+ [Arguments] ${command} ${tool_opt}
BuiltIn.Log ${command}
${output}= SSHLibrary.Write ${command} ${tool_opt}
BuiltIn.Log ${output}
Wait_Until_Tool_Finish
- [Arguments] ${timeout}
[Documentation] Wait ${timeout} for the tool exit.
+ [Arguments] ${timeout}
BuiltIn.Wait Until Keyword Succeeds ${timeout} 1s SSHLibrary.Read Until Prompt
Purchase Is Completed
- [Arguments] ${item_count}
[Documentation] Check purchase of ${item_count} is completed.
+ [Arguments] ${item_count}
${rsp}= RequestsLibrary.Get Request ${car_leader_session} ${carpeopleurl} headers=${ACCEPT_XML}
${count}= XML.Get Element Count ${rsp.content} xpath=car-person
Should Be Equal As Numbers ${count} ${item_count}
BuiltIn.Log ${output}
Store_File_To_Workspace
- [Arguments] ${source_file_name} ${target_file_name}
[Documentation] Store the ${source_file_name} to the workspace as ${target_file_name}.
+ [Arguments] ${source_file_name} ${target_file_name}
${output_log}= SSHLibrary.Execute_Command cat ${source_file_name}
BuiltIn.Log ${output_log}
Create File ${target_file_name} ${output_log}
*** Settings ***
-Documentation Test when a car shard leader is isolated while configuring cars.
+Documentation Test when a car shard leader is isolated while configuring cars.
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... This test suite requires odl-restconf and odl-clustering-test-app modules.
-... The script cluster_rest_script.py is used for generating requests for
-... PUTing car items while the car shard leader is isolated.
-Suite Setup Start_Suite
-Suite Teardown Stop_Suite
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Default Tags critical
-Library RequestsLibrary
-Library SSHLibrary
-Resource ${CURDIR}/../../../libraries/CarPeople.robot
-Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource ${CURDIR}/../../../libraries/RemoteBash.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Resource ${CURDIR}/../../../libraries/Utils.robot
-Resource ${CURDIR}/../../../variables/Variables.robot
+... This test suite requires odl-restconf and odl-clustering-test-app modules.
+... The script cluster_rest_script.py is used for generating requests for
+... PUTing car items while the car shard leader is isolated.
+
+Library RequestsLibrary
+Library SSHLibrary
+Resource ${CURDIR}/../../../libraries/CarPeople.robot
+Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource ${CURDIR}/../../../libraries/RemoteBash.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Resource ${CURDIR}/../../../libraries/Utils.robot
+Resource ${CURDIR}/../../../variables/Variables.robot
+
+Suite Setup Start_Suite
+Suite Teardown Stop_Suite
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+
+Default Tags critical
+
*** Variables ***
-${ITEM_COUNT} ${10000}
-${THREADS} 10
-${ADDCMD} python ${TOOL_NAME} --port ${RESTCONFPORT} add-with-retries --itemtype car --itemcount ${ITEM_COUNT} --threads ${THREADS}
-${CARURL} /restconf/config/car:cars
-${SHARD_NAME} car
-${SHARD_TYPE} config
-${TEST_LOG_LEVEL} info
-@{TEST_LOG_COMPONENTS} org.opendaylight.controller
-${TOOL_OPTIONS} ${EMPTY}
-${TOOL_NAME} cluster_rest_script.py
+${ITEM_COUNT} ${10000}
+${THREADS} 10
+${ADDCMD}
+... python ${TOOL_NAME} --port ${RESTCONFPORT} add-with-retries --itemtype car --itemcount ${ITEM_COUNT} --threads ${THREADS}
+${CARURL} /restconf/config/car:cars
+${SHARD_NAME} car
+${SHARD_TYPE} config
+${TEST_LOG_LEVEL} info
+@{TEST_LOG_COMPONENTS} org.opendaylight.controller
+${TOOL_OPTIONS} ${EMPTY}
+${TOOL_NAME} cluster_rest_script.py
+
*** Test Cases ***
Start_Adding_Cars_To_Follower
Verify_New_Car_Leader_Elected
[Documentation] Verify new owner of the car shard is elected.
- BuiltIn.Wait_Until_Keyword_Succeeds 10x 5s ClusterManagement.Verify_Shard_Leader_Elected ${SHARD_NAME} ${SHARD_TYPE} ${True}
- ... ${old_car_leader} member_index_list=${old_car_followers}
- CarPeople.Set_Tmp_Variables_For_Shard_For_Nodes ${old_car_followers} shard_name=${SHARD_NAME} shard_type=${SHARD_TYPE}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 10x
+ ... 5s
+ ... ClusterManagement.Verify_Shard_Leader_Elected
+ ... ${SHARD_NAME}
+ ... ${SHARD_TYPE}
+ ... ${True}
+ ... ${old_car_leader}
+ ... member_index_list=${old_car_followers}
+ CarPeople.Set_Tmp_Variables_For_Shard_For_Nodes
+ ... ${old_car_followers}
+ ... shard_name=${SHARD_NAME}
+ ... shard_type=${SHARD_TYPE}
Verify_Cars_Configured
[Documentation] Verify that all cars are configured.
Delete Cars
[Documentation] Remove cars from the datastore
${session} = Resolve_Http_Session_For_Member member_index=${new_leader_index}
- ${rsp}= RequestsLibrary.Delete Request ${session} ${CARURL}
+ ${rsp} = RequestsLibrary.Delete Request ${session} ${CARURL}
Should Be Equal As Numbers 200 ${rsp.status_code}
- ${rsp}= RequestsLibrary.Get Request ${session} ${CARURL}
+ ${rsp} = RequestsLibrary.Get Request ${session} ${CARURL}
Should Contain ${DELETED_STATUS_CODES} ${rsp.status_code}
+
*** Keywords ***
Start Suite
[Documentation] Upload the script file and create a virtual env
${mininet_conn_id} = SSHKeywords.Open_Connection_To_Tools_System prompt=~]>
Builtin.Set Suite Variable ${mininet_conn_id}
SSHLibrary.Put File ${CURDIR}/../../../../tools/odl-mdsal-clustering-tests/scripts/${TOOL_NAME} .
- ${stdout} ${stderr} ${rc}= SSHLibrary.Execute Command ls return_stdout=True return_stderr=True
+ ${stdout} ${stderr} ${rc} = SSHLibrary.Execute Command ls return_stdout=True return_stderr=True
... return_rc=True
${out_file} = Utils.Get_Log_File_Name ${TOOL_NAME}
BuiltIn.Set_Suite_Variable ${out_file}
Stop_Tool
${session} = Resolve_Http_Session_For_Member member_index=${new_leader_index}
# best effort to make sure cars are deleted in case more suites will run after this and the delete test case had trouble
- ${rsp}= RequestsLibrary.Delete Request ${session} ${CARURL}
+ ${rsp} = RequestsLibrary.Delete Request ${session} ${CARURL}
BuiltIn.Log ${rsp.status_code} : ${rsp.text}
SSHKeywords.Virtual_Env_Delete
Store_File_To_Workspace ${out_file} ${out_file}
SSHLibrary.Close All Connections
Start_Tool
- [Arguments] ${command} ${tool_opt}
[Documentation] Start the tool
+ [Arguments] ${command} ${tool_opt}
# TODO: https://trello.com/c/rXsMu7iz/444-create-keywords-for-the-tool-start-and-stop-in-remotebash-robot
BuiltIn.Log ${command}
SSHKeywords.Virtual_Env_Activate_On_Current_Session log_output=${True}
- ${output}= SSHLibrary.Write ${command} ${tool_opt} 2>&1 | tee ${out_file}
+ ${output} = SSHLibrary.Write ${command} ${tool_opt} 2>&1 | tee ${out_file}
BuiltIn.Log ${output}
Stop_Tool
[Documentation] Stop the tool if still running.
# TODO: https://trello.com/c/rXsMu7iz/444-create-keywords-for-the-tool-start-and-stop-in-remotebash-robot
- ${output}= SSHLibrary.Read
+ ${output} = SSHLibrary.Read
BuiltIn.Log ${output}
RemoteBash.Write_Bare_Ctrl_C
- ${output}= SSHLibrary.Read_Until_Prompt
+ ${output} = SSHLibrary.Read_Until_Prompt
BuiltIn.Log ${output}
SSHKeywords.Virtual_Env_Deactivate_On_Current_Session log_output=${True}
Verify_Cars_Count
- [Arguments] ${exp_count} ${session}
[Documentation] Count car items in config ds and compare with expected number.
+ [Arguments] ${exp_count} ${session}
${count} = Get_Cars_Count ${session}
BuiltIn.Should_Be_Equal_As_Numbers ${count} ${exp_count}
Get_Cars_Count
- [Arguments] ${session}
[Documentation] Count car items in config ds.
- ${resp}= RequestsLibrary.Get_Request ${session} ${CARURL}
+ [Arguments] ${session}
+ ${resp} = RequestsLibrary.Get_Request ${session} ${CARURL}
${count} = BuiltIn.Evaluate len(${resp.json()}[cars][car-entry])
- BuiltIn.Return_From_Keyword ${count}
+ RETURN ${count}
Ensure_Cars_Being_Configured
- [Arguments] ${session}
[Documentation] FIXME: Add a documentation.
+ [Arguments] ${session}
${count1} = Get_Cars_Count ${session}
${count2} = Get_Cars_Count ${session}
BuiltIn.Should_Not_Be_Equal_As_Integers ${count1} ${count2}
Store_File_To_Workspace
- [Arguments] ${source_file_name} ${target_file_name}
[Documentation] Store the ${source_file_name} to the workspace as ${target_file_name}.
+ [Arguments] ${source_file_name} ${target_file_name}
SSHLibrary.Get_File ${source_file_name} ${target_file_name}
*** Settings ***
-Documentation Suite for testing upgrading persisted data from earlier release.
+Documentation Suite for testing upgrading persisted data from earlier release.
...
-... Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
...
-... This suite kills the running (newer) ODL at its default location.
-... It then installs (configurable) older ODL to an alternative location,
-... pushes large amount of car data, verifies and kills the older ODL.
-... The journal and snapshot files are transferred to the default location
-... and the newer ODL is started.
-... Then it verifies the config data is still present and matches what was seen before.
+... This suite kills the running (newer) ODL at its default location.
+... It then installs (configurable) older ODL to an alternative location,
+... pushes large amount of car data, verifies and kills the older ODL.
+... The journal and snapshot files are transferred to the default location
+... and the newer ODL is started.
+... Then it verifies the config data is still present and matches what was seen before.
...
-... In principle, the suite should also work if "newer" ODL is in fact older.
-... The limiting factor is featuresBoot, the value should be applicable to both ODL versions.
+... In principle, the suite should also work if "newer" ODL is in fact older.
+... The limiting factor is featuresBoot, the value should be applicable to both ODL versions.
...
-... Note that in order to create traffic large enough for snapshots to be created,
-... this suite also actis as a stress test for Restconf.
-... But as that is not a primary focus of this suite,
-... data seen on newer ODL is only compared to what was seen on the older ODL
-... (stored in ${data_before} suite variable).
+... Note that in order to create traffic large enough for snapshots to be created,
+... this suite also actis as a stress test for Restconf.
+... But as that is not a primary focus of this suite,
+... data seen on newer ODL is only compared to what was seen on the older ODL
+... (stored in ${data_before} suite variable).
...
-... As using Robotframework would be both too slow and too memory consuming,
-... this suite uses a specialized Python utility for pushing the data locally on ODL_SYSTEM.
-... The utility filename is configurable, as there may be changes in PATCH behavior in future.
+... As using Robotframework would be both too slow and too memory consuming,
+... this suite uses a specialized Python utility for pushing the data locally on ODL_SYSTEM.
+... The utility filename is configurable, as there may be changes in PATCH behavior in future.
...
-... This suite uses relatively new support for PATCH http method.
-... It repetitively replaces a segment of cars with moving IDs,
-... so that there is a lot of data in journal (both write and delete),
-... but the overall size of data stored remains limited.
+... This suite uses relatively new support for PATCH http method.
+... It repetitively replaces a segment of cars with moving IDs,
+... so that there is a lot of data in journal (both write and delete),
+... but the overall size of data stored remains limited.
...
-... This is 1-node suite, but it still uses ClusterManagement.Check_Cluster_Is_In_Sync
-... in order to detect the same sync condition as 3-node suite would do.
-... Jolokia feature is required for that.
+... This is 1-node suite, but it still uses ClusterManagement.Check_Cluster_Is_In_Sync
+... in order to detect the same sync condition as 3-node suite would do.
+... Jolokia feature is required for that.
...
-... Minimal set of features to be installed: odl-restconf, odl-jolokia, odl-clustering-test-app.
-Suite Setup Setup_Suite
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags 1node carpeople critical
-Library String
-Library SSHLibrary
-Resource ${CURDIR}/../../../libraries/CompareStream.robot
-Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/SSHKeywords.robot
-Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Resource ${CURDIR}/../../../libraries/NexusKeywords.robot
+... Minimal set of features to be installed: odl-restconf, odl-jolokia, odl-clustering-test-app.
+
+Library String
+Library SSHLibrary
+Resource ${CURDIR}/../../../libraries/CompareStream.robot
+Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource ${CURDIR}/../../../libraries/SSHKeywords.robot
+Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Resource ${CURDIR}/../../../libraries/NexusKeywords.robot
+
+Suite Setup Setup_Suite
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags 1node carpeople critical
+
*** Variables ***
-${ALTERNATIVE_BUNDLEFOLDER_PARENT} /tmp/older
-${CAR_VAR_DIR} ${CURDIR}/../../../variables/carpeople/libtest/cars
-${CLUSTER_BOOTUP_SYNC_TIMEOUT} 1200s # Rebooting after kill may take longer time, especially for -all- install.
-${ITERATIONS} 1000
-${MOVE_PER_ITER} 1000
-${PREVIOUS_ODL_RELEASE_ZIP_URL} ${EMPTY}
-${PYTHON_UTILITY_FILENAME} replace_cars.py
-${SEGMENT_SIZE} 10000
+${ALTERNATIVE_BUNDLEFOLDER_PARENT} /tmp/older
+${CAR_VAR_DIR} ${CURDIR}/../../../variables/carpeople/libtest/cars
+# Rebooting after kill may take longer time, especially for -all- install.
+${CLUSTER_BOOTUP_SYNC_TIMEOUT}
+... 1200s
+${ITERATIONS} 1000
+${MOVE_PER_ITER} 1000
+${PREVIOUS_ODL_RELEASE_ZIP_URL} ${EMPTY}
+${PYTHON_UTILITY_FILENAME} replace_cars.py
+${SEGMENT_SIZE} 10000
+
*** Test Cases ***
Select_Latest_Previous_Release_If_Not_Specified
... Note: If current stream is not found on nexus, then it is taken as new one (not released yet).
... So in this case, latest release version is return.
BuiltIn.Set_Suite_Variable ${odl_zip_url} ${PREVIOUS_ODL_RELEASE_ZIP_URL}
- BuiltIn.Pass_Execution_If '${odl_zip_url}'!='' Bundle url to previous release is provided: ${PREVIOUS_ODL_RELEASE_ZIP_URL}, no need to search in nexus.
+ BuiltIn.Pass_Execution_If
+ ... '${odl_zip_url}'!=''
+ ... Bundle url to previous release is provided: ${PREVIOUS_ODL_RELEASE_ZIP_URL}, no need to search in nexus.
${previous_release} = NexusKeywords.Get_Latest_ODL_Previous_Stream_Release_URL ${ODL_STREAM}
BuiltIn.Set_Suite_Variable ${odl_zip_url} ${previous_release}
Install_Older_Odl
[Documentation] Download .zip of older ODL, unpack, delete .zip, copy featuresBoot line.
# Download.
- SSHKeywords.Execute_Command_Should_Pass mkdir -p "${ALTERNATIVE_BUNDLEFOLDER_PARENT}" && cd "${ALTERNATIVE_BUNDLEFOLDER_PARENT}" && rm -rf * && wget -N "${odl_zip_url}"
+ SSHKeywords.Execute_Command_Should_Pass
+ ... mkdir -p "${ALTERNATIVE_BUNDLEFOLDER_PARENT}" && cd "${ALTERNATIVE_BUNDLEFOLDER_PARENT}" && rm -rf * && wget -N "${odl_zip_url}"
# Unzip and detect bundle folder name.
- ${bundle_dir} = SSHKeywords.Execute_Command_Should_Pass cd "${ALTERNATIVE_BUNDLEFOLDER_PARENT}" && unzip -q *.zip && rm *.zip && ls -1
+ ${bundle_dir} = SSHKeywords.Execute_Command_Should_Pass
+ ... cd "${ALTERNATIVE_BUNDLEFOLDER_PARENT}" && unzip -q *.zip && rm *.zip && ls -1
BuiltIn.Set_Suite_Variable \${alternative_bundlefolder} ${ALTERNATIVE_BUNDLEFOLDER_PARENT}/${bundle_dir}
# TODO: Add more strict checks. Folder should have single line, without .zip extension.
# Extract featuresBoot lines.
${cfg_filename} = BuiltIn.Set_Variable org.apache.karaf.features.cfg
${cfg_older} = BuiltIn.Set_Variable ${alternative_bundlefolder}/etc/${cfg_filename}
${cfg_newer} = BuiltIn.Set_Variable ${WORKSPACE}/${BUNDLEFOLDER}/etc/${cfg_filename}
- ${vanilla_line} = SSHKeywords.Execute_Command_Should_Pass grep 'featuresBoot' "${cfg_older}" | grep -v 'featuresBootAsynchronous'
- ${csit_line} = SSHKeywords.Execute_Command_Should_Pass grep 'featuresBoot' "${cfg_newer}" | grep -v 'featuresBootAsynchronous'
+ ${vanilla_line} = SSHKeywords.Execute_Command_Should_Pass
+ ... grep 'featuresBoot' "${cfg_older}" | grep -v 'featuresBootAsynchronous'
+ ${csit_line} = SSHKeywords.Execute_Command_Should_Pass
+ ... grep 'featuresBoot' "${cfg_newer}" | grep -v 'featuresBootAsynchronous'
${karaf4_features} = Extract_Karaf4_Boot_Features ${csit_line}
# TODO: this works only if old odl is karaf3. Once old and new odl both are e.g. karaf4 this will create invalid line.
- ${new_csit_line} = CompareStream.Set_Variable_If_At_Least_Nitrogen ${vanilla_line},${karaf4_features} ${csit_line}
+ ${new_csit_line} = CompareStream.Set_Variable_If_At_Least_Nitrogen
+ ... ${vanilla_line},${karaf4_features}
+ ... ${csit_line}
# Replace the vanilla line.
SSHKeywords.Execute_Command_Should_Pass sed -i 's/${vanilla_line}/${new_csit_line}/g' "${cfg_older}"
# Verify the replaced line.
- ${updated_line} = SSHKeywords.Execute_Command_Should_Pass grep 'featuresBoot' "${cfg_older}" | grep -v 'featuresBootAsynchronous'
+ ${updated_line} = SSHKeywords.Execute_Command_Should_Pass
+ ... grep 'featuresBoot' "${cfg_older}" | grep -v 'featuresBootAsynchronous'
BuiltIn.Should_Not_Be_Equal ${vanilla_line} ${updated_line}
BuiltIn.Should_Be_Equal ${new_csit_line} ${updated_line}
Start_Older_Odl
[Documentation] Start older ODL on background.
[Tags] 1node carpeople # Not critical, to save space in default log.html presentation
- ClusterManagement.Start_Members_From_List_Or_All wait_for_sync=True timeout=${CLUSTER_BOOTUP_SYNC_TIMEOUT} karaf_home=${alternative_bundlefolder}
+ ClusterManagement.Start_Members_From_List_Or_All
+ ... wait_for_sync=True
+ ... timeout=${CLUSTER_BOOTUP_SYNC_TIMEOUT}
+ ... karaf_home=${alternative_bundlefolder}
Add_Data
[Documentation] Put car data to config datastore of older ODL.
- ${command} = BuiltIn.Set_Variable python ${PYTHON_UTILITY_FILENAME} --segment-size=${SEGMENT_SIZE} --iterations=${ITERATIONS} --move-per-iter=${MOVE_PER_ITER}
+ ${command} = BuiltIn.Set_Variable
+ ... python ${PYTHON_UTILITY_FILENAME} --segment-size=${SEGMENT_SIZE} --iterations=${ITERATIONS} --move-per-iter=${MOVE_PER_ITER}
SSHKeywords.Execute_Command_Should_Pass ${command} stderr_must_be_empty=True
# TODO: I have seen 401 here once. Implement workaround or report a Bug.
${first_id} = BuiltIn.Evaluate (${ITERATIONS} - 1) * ${MOVE_PER_ITER} + 1
SetupUtils.Set_Known_Bug_Id 5909
# The following line is the second part of TemplatedRequests.Get_As_Json_Templated for verify=True.
- TemplatedRequests.Verify_Response_As_Json_Templated response=${data_before} folder=${CAR_VAR_DIR} base_name=data iterations=${SEGMENT_SIZE} iter_start=${first_id}
+ TemplatedRequests.Verify_Response_As_Json_Templated
+ ... response=${data_before}
+ ... folder=${CAR_VAR_DIR}
+ ... base_name=data
+ ... iterations=${SEGMENT_SIZE}
+ ... iter_start=${first_id}
Kill_Older_Odl
[Documentation] Kill the older ODL immediatelly.
Transfer_Persisted_Data
[Documentation] Move snapshots and (segmented-)journal into the original ODL installation.
# SSHLibrary.Switch_Connection ${odl_system_ssh_index}
- ${stdout} = SSHKeywords.Execute_Command_Should_Pass cp -rv "${alternative_bundlefolder}/snapshots" "${WORKSPACE}/${BUNDLEFOLDER}/" && cp -rv "${alternative_bundlefolder}/"*journal "${WORKSPACE}/${BUNDLEFOLDER}/"
+ ${stdout} = SSHKeywords.Execute_Command_Should_Pass
+ ... cp -rv "${alternative_bundlefolder}/snapshots" "${WORKSPACE}/${BUNDLEFOLDER}/" && cp -rv "${alternative_bundlefolder}/"*journal "${WORKSPACE}/${BUNDLEFOLDER}/"
Set_Suite_Variable ${stdout}
Check_Snapshot_With_Transferred_Persisted_Data
SSHLibrary.Get_File ${alternative_bundlefolder}/data/log/karaf.log.xz older.karaf.log.xz
# TODO: Uncompress first (or last) megabyte for better readability?
+
*** Keywords ***
Setup_Suite
[Documentation] Activate dependency Resources, create SSH connection, copy Python utility.
BuiltIn.Should_Be_Equal ${data_before} ${data_after}
Extract_Karaf4_Boot_Features
- [Arguments] ${csit_line}
[Documentation] Extract boot features. It is used for the 1st line of karaf4 featuresBoot parameter from org.apache.karaf.features.cfg.
- ${bfeatures} String.Replace_String ${csit_line} ${Space} ${Empty}
- ${bfeatures} String.Replace_String ${bfeatures} featuresBoot= ${Empty}
- ${bfeatures} String.Replace_String ${bfeatures} ,\\ ${Empty}
- BuiltIn.Return_From_Keyword ${bfeatures}
+ [Arguments] ${csit_line}
+ ${bfeatures} = String.Replace_String ${csit_line} ${Space} ${Empty}
+ ${bfeatures} = String.Replace_String ${bfeatures} featuresBoot= ${Empty}
+ ${bfeatures} = String.Replace_String ${bfeatures} ,\\ ${Empty}
+ RETURN ${bfeatures}
*** Settings ***
-Documentation MD-SAL Data Store benchmarking.
+Documentation MD-SAL Data Store benchmarking.
...
-... Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... This test suite uses the odl-dsbenchmark-impl feature controlled
-... via dsbenchmark.py tool for testing the MD-SAL Data Store performance.
-... (see the 'https://wiki.opendaylight.org/view/Controller_Core_Functionality_Tutorials:Tutorials:Data_Store_Benchmarking_and_Data_Access_Patterns')
+... This test suite uses the odl-dsbenchmark-impl feature controlled
+... via dsbenchmark.py tool for testing the MD-SAL Data Store performance.
+... (see the 'https://wiki.opendaylight.org/view/Controller_Core_Functionality_Tutorials:Tutorials:Data_Store_Benchmarking_and_Data_Access_Patterns')
...
-... Based on values in test suite variables it triggers required numbers of
-... warm-up and measured test runs: odl-dsbenchmark-impl module generates
-... (towards MD-SAL Data Store) specified structure, type and number of operations.
-... The test suite performs checks for start-up and test execution timeouts
-... (Start Measurement, Wait For Results) and basic checks for test runs results
-... (Check Results). Finally it provides total numbers per operation structure and type
-... (by default in the perf_per_struct.csv, perf_per_ops.csv files)
-... suitable for plotting in system test environment. See also the
-... 'https://wiki.opendaylight.org/view/CrossProject:Integration_Group:System_Test:Step_by_Step_Guide#Optional_-_Plot_a_graph_from_your_job'
-... Included totals can be filtered using the FILTER parameter (RegExp).
-... Because of the way how graphs are drawn, it is recomended to keep
-... all test suite variables unchanged as defined for the 1st build.
-... Parameters WARMUPS, RUNS and accordingly the TIMEOUT value can be changed
-... for each build if needed. Parameter UNITS defines time units returned
-... by odl-dsbenchmark-impl module. The dsbenchmark.py tool always returns
-... values in miliseconds.
+... Based on values in test suite variables it triggers required numbers of
+... warm-up and measured test runs: odl-dsbenchmark-impl module generates
+... (towards MD-SAL Data Store) specified structure, type and number of operations.
+... The test suite performs checks for start-up and test execution timeouts
+... (Start Measurement, Wait For Results) and basic checks for test runs results
+... (Check Results). Finally it provides total numbers per operation structure and type
+... (by default in the perf_per_struct.csv, perf_per_ops.csv files)
+... suitable for plotting in system test environment. See also the
+... 'https://wiki.opendaylight.org/view/CrossProject:Integration_Group:System_Test:Step_by_Step_Guide#Optional_-_Plot_a_graph_from_your_job'
+... Included totals can be filtered using the FILTER parameter (RegExp).
+... Because of the way how graphs are drawn, it is recomended to keep
+... all test suite variables unchanged as defined for the 1st build.
+... Parameters WARMUPS, RUNS and accordingly the TIMEOUT value can be changed
+... for each build if needed. Parameter UNITS defines time units returned
+... by odl-dsbenchmark-impl module. The dsbenchmark.py tool always returns
+... values in miliseconds.
...
-... When running this robot suite always use --exclude tag for distinguish
-... the run for 3node setup: need a benchmark for leader and follow (--exclude singlenode_setup)
-... the run for 1node setup: no followr present (--exclude clustered_setup)
-Suite Setup Setup_Everything
-Suite Teardown Teardown_Everything
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_And_Start_Fast_Failing_If_Test_Failed
-Library OperatingSystem
-Library SSHLibrary timeout=10s
-Library RequestsLibrary
-Variables ${CURDIR}/../../../variables/Variables.py
-Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource ${CURDIR}/../../../libraries/RemoteBash.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/SSHKeywords.robot
-Resource ${CURDIR}/../../../libraries/Utils.robot
-Resource ${CURDIR}/../../../libraries/WaitForFailure.robot
+... When running this robot suite always use --exclude tag for distinguish
+... the run for 3node setup: need a benchmark for leader and follow (--exclude singlenode_setup)
+... the run for 1node setup: no followr present (--exclude clustered_setup)
+
+Library OperatingSystem
+Library SSHLibrary timeout=10s
+Library RequestsLibrary
+Variables ${CURDIR}/../../../variables/Variables.py
+Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource ${CURDIR}/../../../libraries/RemoteBash.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource ${CURDIR}/../../../libraries/SSHKeywords.robot
+Resource ${CURDIR}/../../../libraries/Utils.robot
+Resource ${CURDIR}/../../../libraries/WaitForFailure.robot
+
+Suite Setup Setup_Everything
+Suite Teardown Teardown_Everything
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_And_Start_Fast_Failing_If_Test_Failed
+
*** Variables ***
-${ODL_LOG_LEVEL} info
-${TX_TYPE} {TX-CHAINING,SIMPLE-TX}
-${OP_TYPE} {PUT,READ,MERGE,DELETE}
-${TOTAL_OPS} 100000
-${OPS_PER_TX} 100000
-${INNER_OPS} 100000
-${WARMUPS} 4
-${RUNS} 8
-${TIMEOUT} 3h
-${FILTER} EXEC
-${UNITS} microseconds
-${tool} dsbenchmark.py
-${tool_startup_timeout} 10s
-${tool_log_name} dsbenchmark.log
-${tool_output_name} test.csv
-${tool_results1_name} perf_per_struct.csv
-${tool_results2_name} perf_per_ops.csv
+${ODL_LOG_LEVEL} info
+${TX_TYPE} {TX-CHAINING,SIMPLE-TX}
+${OP_TYPE} {PUT,READ,MERGE,DELETE}
+${TOTAL_OPS} 100000
+${OPS_PER_TX} 100000
+${INNER_OPS} 100000
+${WARMUPS} 4
+${RUNS} 8
+${TIMEOUT} 3h
+${FILTER} EXEC
+${UNITS} microseconds
+${tool} dsbenchmark.py
+${tool_startup_timeout} 10s
+${tool_log_name} dsbenchmark.log
+${tool_output_name} test.csv
+${tool_results1_name} perf_per_struct.csv
+${tool_results2_name} perf_per_ops.csv
+
*** Test Cases ***
Measure_Both_Datastores_For_One_Node_Odl_Setup
Merge_Csv perf_per_ops.csv
Merge_Csv perf_per_struct.csv
+
*** Keywords ***
Setup_Everything
[Documentation] Setup imported resources, SSH-login to mininet machine,
SSHLibrary.Close_All_Connections
Start_Benchmark_Tool
- [Arguments] ${tested_datastore} ${tested_node_ip} ${warmups} ${runs} ${total_ops} ${inner_ops}
- ... ${tx_type} ${ops_per_tx} ${op_type} ${retry}=${EMPTY}
[Documentation] Start the benchmark tool. Check that it has been running at least for ${tool_startup_timeout} period.
... If the script exits early, retry once after \${retry} if specified.
- ${command}= BuiltIn.Set_Variable python ${tool} --host ${tested_node_ip} --port ${RESTCONFPORT} --warmup ${warmups} --runs ${runs} --total ${total_ops} --inner ${inner_ops} --txtype ${tx_type} --ops ${ops_per_tx} --optype ${op_type} --plot ${FILTER} --units ${UNITS} --datastore ${tested_datastore} &> ${tool_log_name}
+ [Arguments] ${tested_datastore} ${tested_node_ip} ${warmups} ${runs} ${total_ops} ${inner_ops}
+ ... ${tx_type} ${ops_per_tx} ${op_type} ${retry}=${EMPTY}
+ ${command}= BuiltIn.Set_Variable
+ ... python ${tool} --host ${tested_node_ip} --port ${RESTCONFPORT} --warmup ${warmups} --runs ${runs} --total ${total_ops} --inner ${inner_ops} --txtype ${tx_type} --ops ${ops_per_tx} --optype ${op_type} --plot ${FILTER} --units ${UNITS} --datastore ${tested_datastore} &> ${tool_log_name}
BuiltIn.Log ${command}
SSHKeywords.Virtual_Env_Activate_On_Current_Session
${output}= SSHLibrary.Write ${command}
- ${status} ${message}= BuiltIn.Run Keyword And Ignore Error Write Until Expected Output ${EMPTY} ${TOOLS_SYSTEM_PROMPT} ${tool_startup_timeout}
+ ${status} ${message}= BuiltIn.Run Keyword And Ignore Error
+ ... Write Until Expected Output
+ ... ${EMPTY}
+ ... ${TOOLS_SYSTEM_PROMPT}
+ ... ${tool_startup_timeout}
... 1s
BuiltIn.Log ${status}
BuiltIn.Log ${message}
- BuiltIn.Return From Keyword If "${status}" != "PASS"
- BuiltIn.Run Keyword If """${retry}""" == "" BuiltIn.Fail Benchmark tool is not running.
+ IF "${status}" != "PASS" RETURN
+ IF """${retry}""" == "" BuiltIn.Fail Benchmark tool is not running.
BuiltIn.Comment An ugly hack for Carbon -all- jobs being slow to finish booting. FIXME: Use WUKS and open a Bug.
BuiltIn.Sleep ${retry}
${output}= SSHLibrary.Write ${command}
- ${status} ${message}= BuiltIn.Run Keyword And Ignore Error Write Until Expected Output ${EMPTY} ${TOOLS_SYSTEM_PROMPT} ${tool_startup_timeout}
+ ${status} ${message}= BuiltIn.Run Keyword And Ignore Error
+ ... Write Until Expected Output
+ ... ${EMPTY}
+ ... ${TOOLS_SYSTEM_PROMPT}
+ ... ${tool_startup_timeout}
... 1s
BuiltIn.Log ${status}
BuiltIn.Log ${message}
- BuiltIn.Run Keyword If "${status}" == "PASS" BuiltIn.Fail Benchmark tool is not running.
+ IF "${status}" == "PASS"
+ BuiltIn.Fail Benchmark tool is not running.
+ END
Wait_Until_Benchmark_Tool_Finish
- [Arguments] ${timeout}
[Documentation] Wait until the benchmark tool is finished. Fail in case of test timeout (${timeout}).
... In order to prevent SSH session from closing due to inactivity, newline is sent every check.
+ [Arguments] ${timeout}
BuiltIn.Wait Until Keyword Succeeds ${timeout} 30s BuiltIn.Run Keywords SSHLibrary.Write ${EMPTY}
... AND SSHLibrary.Read Until Prompt
SSHKeywords.Virtual_Env_Deactivate_On_Current_Session
Get_Log_File
- [Arguments] ${file_name}
[Documentation] Return and log content of the provided file.
+ [Arguments] ${file_name}
${output_log}= SSHLibrary.Execute_Command cat ${file_name}
BuiltIn.Log ${output_log}
- [Return] ${output_log}
+ RETURN ${output_log}
Store_File_To_Robot
- [Arguments] ${file_name} ${file_prefix}
[Documentation] Store the provided file from the MININET to the ROBOT machine.
+ [Arguments] ${file_name} ${file_prefix}
${output_log}= SSHLibrary.Execute_Command cat ${file_name}
BuiltIn.Log ${output_log}
OperatingSystem.Create_File ${file_prefix}${file_name} ${output_log}
BuiltIn.Should Not Contain ${tool_log} status: NOK
Set_Node_Ip_For_Benchmark
- [Arguments] ${state} ${tested_ds} ${file_prefix}
[Documentation] Returns the node ip which should be tested
- BuiltIn.Return From Keyword If ${NUM_ODL_SYSTEM}==1 ${ODL_SYSTEM_1_IP}
+ [Arguments] ${state} ${tested_ds} ${file_prefix}
+ IF ${NUM_ODL_SYSTEM}==1 RETURN ${ODL_SYSTEM_1_IP}
${shard_type}= BuiltIn.Set_Variable_If "${tested_ds}"=="CONFIG" config operational
${leader} ${followers}= ClusterManagement.Get_Leader_And_Followers_For_Shard shard_type=${shard_type}
- BuiltIn.Return From Keyword If "${state}"=="leader" ${ODL_SYSTEM_${leader}_IP}
- BuiltIn.Return From Keyword ${ODL_SYSTEM_${followers}[0]_IP}
+ IF "${state}"=="leader" RETURN ${ODL_SYSTEM_${leader}_IP}
+ RETURN ${ODL_SYSTEM_${followers}[0]_IP}
Measuring_Template
- [Arguments] ${state} ${tested_ds} ${file_prefix} ${retry}=${EMPTY} ${warmups}=${WARMUPS} ${runs}=${RUNS}
- ... ${total_ops}=${TOTAL_OPS} ${inner_ops}=${INNER_OPS} ${tx_type}=${TX_TYPE} ${ops_per_tx}=${OPS_PER_TX} ${op_type}=${OP_TYPE}
[Documentation] Keywork which will cover a whole banchmark.
... If ${file_prefix} is ${Empty} we have 1 node odl.
+ [Arguments] ${state} ${tested_ds} ${file_prefix} ${retry}=${EMPTY} ${warmups}=${WARMUPS} ${runs}=${RUNS}
+ ... ${total_ops}=${TOTAL_OPS} ${inner_ops}=${INNER_OPS} ${tx_type}=${TX_TYPE} ${ops_per_tx}=${OPS_PER_TX} ${op_type}=${OP_TYPE}
${odl_node_ip}= Set_Node_Ip_For_Benchmark ${state} ${tested_ds} ${file_prefix}
Start_Benchmark_Tool ${tested_ds} ${odl_node_ip} ${warmups} ${runs} ${total_ops} ${inner_ops}
... ${tx_type} ${ops_per_tx} ${op_type} retry=${retry}
Store_File_To_Robot ${tool_results1_name} ${file_prefix}
Store_File_To_Robot ${tool_results2_name} ${file_prefix}
${odl_node_ip_after}= Set_Node_Ip_For_Benchmark ${state} ${tested_ds} ${file_prefix}
- BuiltIn.Should_Be_Equal ${odl_node_ip} ${odl_node_ip_after} Leader changed from ${odl_node_ip} to ${odl_node_ip_after} during the benchmark.
+ BuiltIn.Should_Be_Equal
+ ... ${odl_node_ip}
+ ... ${odl_node_ip_after}
+ ... Leader changed from ${odl_node_ip} to ${odl_node_ip_after} during the benchmark.
[Teardown] Stop_Measurement_And_Save_Logs
Stop_Measurement_And_Save_Logs
Collect Logs
Merge_Csv
- [Arguments] ${final_file}
[Documentation] Creates ${final_file} csv file from existing files in the current directory
+ [Arguments] ${final_file}
${final_columns}= BuiltIn.Set_Variable ${Empty}
${final_values}= BuiltIn.Set_variable ${Empty}
@{csv_files}= OperatingSystem.List_Files_In_Directory . *${final_file}
${csv_content}= OperatingSystem.GetFile ${file}
${column_names}= Get_Column_Names ${file} ${csv_content}
${column_values}= String.Get_Line ${csv_content} 1
- ${final_columns}= BuiltIn.Set_Variable_If "${final_columns}"=="${Empty}" ${column_names} ${final_columns},${column_names}
- ${final_values}= BuiltIn.Set_Variable_If "${final_values}"=="${Empty}" ${column_values} ${final_values},${column_values}
+ ${final_columns}= BuiltIn.Set_Variable_If
+ ... "${final_columns}"=="${Empty}"
+ ... ${column_names}
+ ... ${final_columns},${column_names}
+ ${final_values}= BuiltIn.Set_Variable_If
+ ... "${final_values}"=="${Empty}"
+ ... ${column_values}
+ ... ${final_values},${column_values}
END
${content}= BuiltIn.Catenate SEPARATOR=${\n} ${final_columns} ${final_values}
OperatingSystem.Create_File ${final_file} ${content}
Get_Column_Names
- [Arguments] ${file_name} ${file_content}
[Documentation] Returns the first line of the given csv file. It is modified if the file name
... indicates that it is the file from the shard follower.
+ [Arguments] ${file_name} ${file_content}
${column_names}= String.Get_Line ${file_content} 0
- BuiltIn.Return_From_Keyword_If "_fol_" not in "${file_name}" ${column_names}
+ IF "_fol_" not in "${file_name}" RETURN ${column_names}
# now we have followers and FOL_ will be prepended to the column names
- @{columns} String.Split_String ${column_names} ,
- ${final_columns} BuiltIn.Set_Variable ${Empty}
+ @{columns}= String.Split_String ${column_names} ,
+ ${final_columns}= BuiltIn.Set_Variable ${Empty}
FOR ${column} IN @{columns}
- ${final_columns} BuiltIn.Set_Variable_If "${final_columns}"=="${Empty}" FOL_${column} ${final_columns},FOL_${column}
+ ${final_columns}= BuiltIn.Set_Variable_If
+ ... "${final_columns}"=="${Empty}"
+ ... FOL_${column}
+ ... ${final_columns},FOL_${column}
END
- BuiltIn.Return_From_Keyword ${final_columns}
+ RETURN ${final_columns}
*** Settings ***
-Documentation Cluster Singleton testing: Chasing the Leader
+Documentation Cluster Singleton testing: Chasing the Leader
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... This test aims to establish the service operates correctly when faced with
-... rapid application transitions without having a stabilized application.
-Suite Setup Setup_Keyword
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Library SSHLibrary
-Resource ${CURDIR}/../../../libraries/controller/CsCommon.robot
-Resource ${CURDIR}/../../../libraries/CompareStream.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+... This test aims to establish the service operates correctly when faced with
+... rapid application transitions without having a stabilized application.
+
+Library SSHLibrary
+Resource ${CURDIR}/../../../libraries/controller/CsCommon.robot
+Resource ${CURDIR}/../../../libraries/CompareStream.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup Setup_Keyword
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags critical
+
*** Variables ***
-${TEST_DURATION} 1m
+${TEST_DURATION} 1m
${ACCEPTED_PER_SEC_RATE} 5
# NOTE: The shared infra that we use can sometimes be sluggish and we get false failures.
# There are cases when the rate will be under 20 as well as over 100. Normally it is over
# Some discussion of this can be found in the comments of
# https://git.opendaylight.org/gerrit/#/c/74692/.
+
*** Test Cases ***
Register_Candidates
[Documentation] Register a candidate application on each node which starts the test.
Unregister_Candidates_And_Validate_Criteria
[Documentation] Unregister the testing service and check recevied statistics.
- CsCommon.Unregister_Flapping_Singleton_On_Nodes_And_Validate_Results ${cs_all_indices} ${ACCEPTED_PER_SEC_RATE} ${TEST_DURATION}
+ CsCommon.Unregister_Flapping_Singleton_On_Nodes_And_Validate_Results
+ ... ${cs_all_indices}
+ ... ${ACCEPTED_PER_SEC_RATE}
+ ... ${TEST_DURATION}
+
*** Keywords ***
Setup_Keyword
*** Settings ***
-Documentation Cluster Singleton testing: Chasing the Leader
+Documentation Cluster Singleton testing: Chasing the Leader
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... This test aims to establish the service operates correctly when faced with
-... rapid application transitions without having a stabilized application.
-Suite Setup Setup_Keyword
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Library SSHLibrary
-Resource ${CURDIR}/../../../libraries/controller/CsCommon.robot
-Resource ${CURDIR}/../../../libraries/CompareStream.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+... This test aims to establish the service operates correctly when faced with
+... rapid application transitions without having a stabilized application.
+
+Library SSHLibrary
+Resource ${CURDIR}/../../../libraries/controller/CsCommon.robot
+Resource ${CURDIR}/../../../libraries/CompareStream.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup Setup_Keyword
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags critical
+
*** Variables ***
# TODO: change back to 24h when jenkins has more granular steps to abort jobs than days; now 23h
-${TEST_DURATION} 23h
+${TEST_DURATION} 23h
${ACCEPTED_PER_SEC_RATE} 100
+
*** Test Cases ***
Register_Candidates
[Documentation] Register a candidate application on each node which starts the test.
Unregister_Candidates_And_Validate_Criteria
[Documentation] Unregister the testing service and check recevied statistics.
- CsCommon.Unregister_Flapping_Singleton_On_Nodes_And_Validate_Results ${cs_all_indices} ${ACCEPTED_PER_SEC_RATE} ${TEST_DURATION}
+ CsCommon.Unregister_Flapping_Singleton_On_Nodes_And_Validate_Results
+ ... ${cs_all_indices}
+ ... ${ACCEPTED_PER_SEC_RATE}
+ ... ${TEST_DURATION}
+
*** Keywords ***
Setup_Keyword
*** Settings ***
-Documentation Cluster Singleton testing: Master Stability
+Documentation Cluster Singleton testing: Master Stability
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... Cluster Singleton service is designed to ensure that only one instance of an
-... application is registered globally in the cluster.
-... The goal is to establish the service operates correctly in face of application
-... registration changing without moving the active instance.
-Suite Setup Setup_Keyword
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Library Collections
-Library SSHLibrary
-Resource ${CURDIR}/../../../libraries/controller/CsCommon.robot
-Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/WaitForFailure.robot
+... Cluster Singleton service is designed to ensure that only one instance of an
+... application is registered globally in the cluster.
+... The goal is to establish the service operates correctly in face of application
+... registration changing without moving the active instance.
+
+Library Collections
+Library SSHLibrary
+Resource ${CURDIR}/../../../libraries/controller/CsCommon.robot
+Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource ${CURDIR}/../../../libraries/WaitForFailure.robot
+
+Suite Setup Setup_Keyword
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags critical
+
*** Variables ***
${STABILITY_TIMEOUT} 1m
+
*** Test Cases ***
Register_Singleton_Constant_On_Each_Node_And_Verify
[Documentation] Register a candidate application on each node.
CsCommon.Register_Singleton_Constant_On_Nodes ${cs_all_indices}
${owner} ${candidates}= CsCommon.Get_And_Save_Present_CsOwner_And_CsCandidates 1
- BuiltIn.Wait_Until_Keyword_Succeeds 15s 2s CsCommon.Verify_Singleton_Constant_On_Nodes ${cs_all_indices} ${CS_CONSTANT_PREFIX}${owner}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 15s
+ ... 2s
+ ... CsCommon.Verify_Singleton_Constant_On_Nodes
+ ... ${cs_all_indices}
+ ... ${CS_CONSTANT_PREFIX}${owner}
Unregister_Singleton_Constant_On_Non_Master_Node
[Documentation] Unregister the application on a non master node.
- ${unregistered_node} = Get_Node_Idx_To_Unregister
+ ${unregistered_node}= Get_Node_Idx_To_Unregister
CsCommon.Unregister_Singleton_And_Update_Expected_Candidates ${unregistered_node}
BuiltIn.Set_Suite_Variable ${unregistered_node}
Reregister_Singleton_Constant
[Documentation] Re-register the unregistered candidate.
- CsCommon.Register_Singleton_And_Update_Expected_Candidates ${unregistered_node} ${CS_CONSTANT_PREFIX}${unregistered_node}
+ CsCommon.Register_Singleton_And_Update_Expected_Candidates
+ ... ${unregistered_node}
+ ... ${CS_CONSTANT_PREFIX}${unregistered_node}
Verify_Stability_After_Reregistration
[Documentation] Verify that the owner remains on the same node after the unregistered candidate re-registration.
- WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout 5x 3s CsCommon.Verify_Owner_And_Candidates_Stable ${cs_owner}
+ WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout
+ ... 5x
+ ... 3s
+ ... CsCommon.Verify_Owner_And_Candidates_Stable
+ ... ${cs_owner}
Unregister_Singleton_Constant_On_Each_Node
[Documentation] Unregister the application from each node.
CsCommon.Unregister_Singleton_Constant_On_Nodes ${cs_all_indices}
+
*** Keywords ***
Setup_Keyword
SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
Get_Node_Idx_To_Unregister
[Documentation] Return the first non owner node from the stored candidate list.
FOR ${index} IN @{cs_candidates}
- BuiltIn.Return_From_Keyword_If "${index}" != "${cs_owner}" ${index}
+ IF "${index}" != "${cs_owner}" RETURN ${index}
END
*** Settings ***
-Documentation Cluster Singleton testing: Partition And Heal
+Documentation Cluster Singleton testing: Partition And Heal
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... Cluster Singleton service is designed to ensure that only one instance of
-... an application is registered globally in the cluster.
-... The goal is to establish the service operates correctly in face of node
-... failures.
-Suite Setup Setup_Keyword
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Library Collections
-Library SSHLibrary
-Library RequestsLibrary
-Resource ${CURDIR}/../../../libraries/controller/CsCommon.robot
-Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource ${CURDIR}/../../../libraries/MdsalLowlevel.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/WaitForFailure.robot
+... Cluster Singleton service is designed to ensure that only one instance of
+... an application is registered globally in the cluster.
+... The goal is to establish the service operates correctly in face of node
+... failures.
+
+Library Collections
+Library SSHLibrary
+Library RequestsLibrary
+Resource ${CURDIR}/../../../libraries/controller/CsCommon.robot
+Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource ${CURDIR}/../../../libraries/MdsalLowlevel.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource ${CURDIR}/../../../libraries/WaitForFailure.robot
+
+Suite Setup Setup_Keyword
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags critical
+
*** Variables ***
-${STABILITY_TIMEOUT_ISOLATED} 120s
-${STABILITY_TIMEOUT_REJOINED} 60s
-@{STATUS_ISOLATED} ${501}
+${STABILITY_TIMEOUT_ISOLATED} 120s
+${STABILITY_TIMEOUT_REJOINED} 60s
+@{STATUS_ISOLATED} ${501}
+
*** Test Cases ***
Register_Singleton_Constant_On_Each_Node
[Documentation] Store the owner and candidates of the application and initially verify that all
... odl nodes are used.
${owner} ${candidates}= CsCommon.Get_And_Save_Present_CsOwner_And_CsCandidates 1
- BuiltIn.Wait_Until_Keyword_Succeeds 15 2s CsCommon.Verify_Singleton_Constant_On_Nodes ${cs_all_indices} ${CS_CONSTANT_PREFIX}${owner}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 15
+ ... 2s
+ ... CsCommon.Verify_Singleton_Constant_On_Nodes
+ ... ${cs_all_indices}
+ ... ${CS_CONSTANT_PREFIX}${owner}
Isolate_Owner_Node
[Documentation] Isolate the cluster node which is the owner. Wait until the new owner is elected and store
Monitor_Stability_While_Isolated
[Documentation] Monitor the stability of the singleton application and fail the the owner is changed during the monitoring.
- WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout ${STABILITY_TIMEOUT_ISOLATED} 3s CsCommon.Verify_Singleton_Constant_During_Isolation
+ WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout
+ ... ${STABILITY_TIMEOUT_ISOLATED}
+ ... 3s
+ ... CsCommon.Verify_Singleton_Constant_During_Isolation
Rejoin_Isolated_node
[Documentation] Rejoin isolated node.
[Documentation] Unregister the application on every node.
CsCommon.Unregister_Singleton_Constant_On_Nodes ${cs_all_indices}
+
*** Keywords ***
Setup_Keyword
[Documentation] Suite setup.
*** Settings ***
-Documentation Cluster Singleton testing: Partition And Heal longevity suite
+Documentation Cluster Singleton testing: Partition And Heal longevity suite
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... Cluster Singleton service is designed to ensure that only one instance of
-... an application is registered globally in the cluster.
-... The goal is to establish the service operates correctly in face of node
-... failures.
-Suite Setup Setup_Keyword
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Library Collections
-Library SSHLibrary
-Library RequestsLibrary
-Resource ${CURDIR}/../../../libraries/controller/CsCommon.robot
-Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource ${CURDIR}/../../../libraries/MdsalLowlevel.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/WaitForFailure.robot
+... Cluster Singleton service is designed to ensure that only one instance of
+... an application is registered globally in the cluster.
+... The goal is to establish the service operates correctly in face of node
+... failures.
+
+Library Collections
+Library SSHLibrary
+Library RequestsLibrary
+Resource ${CURDIR}/../../../libraries/controller/CsCommon.robot
+Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource ${CURDIR}/../../../libraries/MdsalLowlevel.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource ${CURDIR}/../../../libraries/WaitForFailure.robot
+
+Suite Setup Setup_Keyword
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags critical
+
*** Variables ***
# TODO: change back to 24h when releng has more granular steps to kill VMs than days; now 23h=82800s
-${LONGEVITY_TEST_DURATION_IN_SECS} 82800
-${STABILITY_TIMEOUT_ISOLATED} 120s
-${STABILITY_TIMEOUT_REJOINED} 60s
-@{STATUS_ISOLATED} ${501}
+${LONGEVITY_TEST_DURATION_IN_SECS} 82800
+${STABILITY_TIMEOUT_ISOLATED} 120s
+${STABILITY_TIMEOUT_REJOINED} 60s
+@{STATUS_ISOLATED} ${501}
+
*** Test Cases ***
CS_Pertition_And_Heal
[Documentation] 24h lasting suite for isolating the cluster singleton leader repeatedly.
CsCommon.Register_Singleton_Constant_On_Nodes ${cs_all_indices}
- WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout ${LONGEVITY_TEST_DURATION_IN_SECS} 3s Test_Scenario
+ WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout
+ ... ${LONGEVITY_TEST_DURATION_IN_SECS}
+ ... 3s
+ ... Test_Scenario
CsCommon.Unregister_Singleton_Constant_On_Nodes ${cs_all_indices}
+
*** Keywords ***
Setup_Keyword
[Documentation] Suite setup.
... Monitor the stability of the singleton application and fail the the owner is changed during the monitoring. Monitoring
... is done after the node isolation and after the node rejoin.
${owner} ${candidates}= CsCommon.Get_And_Save_Present_CsOwner_And_CsCandidates 1
- BuiltIn.Wait_Until_Keyword_Succeeds 15s 2s CsCommon.Verify_Singleton_Constant_On_Nodes ${cs_all_indices} ${CS_CONSTANT_PREFIX}${owner}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 15s
+ ... 2s
+ ... CsCommon.Verify_Singleton_Constant_On_Nodes
+ ... ${cs_all_indices}
+ ... ${CS_CONSTANT_PREFIX}${owner}
KarafKeywords.Log_Message_To_Controller_Karaf Isolating node${owner}.
CsCommon.Isolate_Owner_And_Verify_Isolated
- WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout ${STABILITY_TIMEOUT_ISOLATED} 3s CsCommon.Verify_Singleton_Constant_During_Isolation
+ WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout
+ ... ${STABILITY_TIMEOUT_ISOLATED}
+ ... 3s
+ ... CsCommon.Verify_Singleton_Constant_During_Isolation
KarafKeywords.Log_Message_To_Controller_Karaf Rejoining node${owner}.
CsCommon.Rejoin_Node_And_Verify_Rejoined
- WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout ${STABILITY_TIMEOUT_REJOINED} 3s CsCommon.Verify_Singleton_Constant_On_Nodes ${cs_all_indices} ${CS_CONSTANT_PREFIX}${cs_owner}
+ WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout
+ ... ${STABILITY_TIMEOUT_REJOINED}
+ ... 3s
+ ... CsCommon.Verify_Singleton_Constant_On_Nodes
+ ... ${cs_all_indices}
+ ... ${CS_CONSTANT_PREFIX}${cs_owner}
*** Settings ***
-Documentation DOMDataBroker testing: Clean Leader Shutdown
+Documentation DOMDataBroker testing: Clean Leader Shutdown
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... The goal is to ensure that applications do not observe disruption when a shard
-... leader is shut down cleanly. This is performed by having a steady-stream
-... producer execute operations against the shard and then initiate leader shard
-... shutdown, then the producer is shut down cleanly.
-Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Test Template DdbCommons.Clean_Leader_Shutdown_Test_Templ
-Library SSHLibrary
-Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+... The goal is to ensure that applications do not observe disruption when a shard
+... leader is shut down cleanly. This is performed by having a steady-stream
+... producer execute operations against the shard and then initiate leader shard
+... shutdown, then the producer is shut down cleanly.
+
+Library SSHLibrary
+Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+Test Template DdbCommons.Clean_Leader_Shutdown_Test_Templ
+
+Default Tags critical
+
*** Test Cases ***
Local_Leader_Shutdown
[Documentation] Shutdown the leader on the same node as transaction producer.
local
-
Restart
[Documentation] Restart odl
[Template] ${EMPTY}
DdbCommons.Restart_Test_Templ
-
Remote_Leader_Shutdown
[Documentation] Shutdown the leader on different node as transaction producer.
remote
*** Settings ***
-Documentation DOMDataBroker testing: Clean Leader Shutdown
+Documentation DOMDataBroker testing: Clean Leader Shutdown
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... The goal is to ensure that applications do not observe disruption when a shard
-... leader is shut down cleanly. This is performed by having a steady-stream
-... producer execute operations against the shard and then initiate leader shard
-... shutdown, then the producer is shut down cleanly.
-Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup BuiltIn.Run_Keywords SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-... AND DdbCommons.Create_Prefix_Based_Shard_And_Verify
-Test Teardown BuiltIn.Run_Keywords DdbCommons.Remove_Prefix_Based_Shard_And_Verify
-... AND SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Test Template DdbCommons.Clean_Leader_Shutdown_PrefBasedShard_Test_Templ
-Library SSHLibrary
-Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+... The goal is to ensure that applications do not observe disruption when a shard
+... leader is shut down cleanly. This is performed by having a steady-stream
+... producer execute operations against the shard and then initiate leader shard
+... shutdown, then the producer is shut down cleanly.
+
+Library SSHLibrary
+Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup BuiltIn.Run_Keywords SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+... AND DdbCommons.Create_Prefix_Based_Shard_And_Verify
+Test Teardown BuiltIn.Run_Keywords DdbCommons.Remove_Prefix_Based_Shard_And_Verify
+... AND SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+Test Template DdbCommons.Clean_Leader_Shutdown_PrefBasedShard_Test_Templ
+
+Default Tags critical
+
*** Test Cases ***
Local_Leader_Shutdown
[Documentation] Shutdown the leader on the same node as transaction producer.
local
-
Restart
[Documentation] Restart odl.
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
[Template] ${EMPTY}
+ [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
DdbCommons.Restart_Test_Templ
[Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-
Remote_Leader_Shutdown
[Documentation] Shutdown the leader on different node as transaction producer.
remote
*** Settings ***
-Documentation DOMDataBroker testing: Client Isolation
+Documentation DOMDataBroker testing: Client Isolation
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... The purpose of this test is to ascertain that the failure modes of
-... cds-access-client work as expected. This is performed by having a steady
-... stream of transactions flowing from the frontend and isolating the node hosting
-... the frontend from the rest of the cluster.
-Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Test Template DdbCommons.Client_Isolation_Test_Templ
-Library SSHLibrary
-Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+... The purpose of this test is to ascertain that the failure modes of
+... cds-access-client work as expected. This is performed by having a steady
+... stream of transactions flowing from the frontend and isolating the node hosting
+... the frontend from the rest of the cluster.
+
+Library SSHLibrary
+Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+Test Template DdbCommons.Client_Isolation_Test_Templ
+
+Default Tags critical
+
*** Test Cases ***
Producer_On_Shard_Leader_Node_ChainedTx
[Documentation] Client isolation with producer on shard leader with chained transactions.
leader ${CHAINED_TX}
-
Restart1
[Documentation] Restart odl
[Template] ${EMPTY}
DdbCommons.Restart_Test_Templ
-
Producer_On_Shard_Leader_Node_SimpleTx
[Documentation] Client isolation with producer on shard leader with simple transactions.
leader ${SIMPLE_TX}
-
Restart2
[Documentation] Restart odl
[Template] ${EMPTY}
DdbCommons.Restart_Test_Templ
-
Producer_On_Shard_Non_Leader_Node_ChainedTx
[Documentation] Client isolation with producer on shard non-leader with chained transactions.
non-leader ${CHAINED_TX}
-
Restart3
[Documentation] Restart odl
[Template] ${EMPTY}
DdbCommons.Restart_Test_Templ
-
Producer_On_Shard_Non_Leader_Node_SimpleTx
[Documentation] Client isolation with producer on shard non-leader with simple transactions.
non-leader ${SIMPLE_TX}
*** Settings ***
-Documentation DOMDataBroker testing: Client Isolation
+Documentation DOMDataBroker testing: Client Isolation
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... The purpose of this test is to ascertain that the failure modes of
-... cds-access-client work as expected. This is performed by having a steady
-... stream of transactions flowing from the frontend and isolating the node hosting
-... the frontend from the rest of the cluster.
-Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup BuiltIn.Run_Keywords SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-... AND DdbCommons.Create_Prefix_Based_Shard_And_Verify
-Test Teardown BuiltIn.Run_Keywords DdbCommons.Remove_Prefix_Based_Shard_And_Verify
-... AND SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Test Template DdbCommons.Client_Isolation_PrefBasedShard_Test_Templ
-Library SSHLibrary
-Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+... The purpose of this test is to ascertain that the failure modes of
+... cds-access-client work as expected. This is performed by having a steady
+... stream of transactions flowing from the frontend and isolating the node hosting
+... the frontend from the rest of the cluster.
+
+Library SSHLibrary
+Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup BuiltIn.Run_Keywords SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+... AND DdbCommons.Create_Prefix_Based_Shard_And_Verify
+Test Teardown BuiltIn.Run_Keywords DdbCommons.Remove_Prefix_Based_Shard_And_Verify
+... AND SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+Test Template DdbCommons.Client_Isolation_PrefBasedShard_Test_Templ
+
+Default Tags critical
+
*** Test Cases ***
Producer_On_Shard_Leader_Node_Isolated_Transactions
[Documentation] Client isolation with producer on shard leader with isolated transactions flag set.
leader ${ISOLATED_TRANS_TRUE}
-
Restart1
[Documentation] Restart odl.
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
[Template] ${EMPTY}
+ [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
DdbCommons.Restart_Test_Templ
[Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-
Producer_On_Shard_Leader_Node_Nonisolated_Transactions
[Documentation] Client isolation with producer on shard leader with isolated transactions flag unset.
leader ${ISOLATED_TRANS_FALSE}
-
Restart2
[Documentation] Restart odl.
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
[Template] ${EMPTY}
+ [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
DdbCommons.Restart_Test_Templ
[Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-
Producer_On_Shard_Non_Leader_Node_Isolated_Transactions
[Documentation] Client isolation with producer on shard non-leader with isolated transactions flag set.
non-leader ${ISOLATED_TRANS_TRUE}
-
Restart3
[Documentation] Restart odl
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
[Template] ${EMPTY}
+ [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
DdbCommons.Restart_Test_Templ
[Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-
Producer_On_Shard_Non_Leader_Node_Nonisolated_Transactions
[Documentation] Client isolation with producer on shard non-leader with isolated transactions flag unset.
non-leader ${ISOLATED_TRANS_FALSE}
*** Settings ***
-Documentation DOMDataBroker testing: Module based shards sanity suite
+Documentation DOMDataBroker testing: Module based shards sanity suite
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... The goal is to call several basic rpc form ClusterAdmin.robot and
-... MdsalLowlevel.robot to ensute that those rpcs can be safely used in
-... other suites.
-... It also verify the ability of the odl-controller-test-app to perform
-... several activities.
-Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Library SSHLibrary
-Library ${CURDIR}/../../../libraries/MdsalLowlevelPy.py
-Resource ${CURDIR}/../../../libraries/ClusterAdmin.robot
-Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+... The goal is to call several basic rpc form ClusterAdmin.robot and
+... MdsalLowlevel.robot to ensute that those rpcs can be safely used in
+... other suites.
+... It also verify the ability of the odl-controller-test-app to perform
+... several activities.
+
+Library SSHLibrary
+Library ${CURDIR}/../../../libraries/MdsalLowlevelPy.py
+Resource ${CURDIR}/../../../libraries/ClusterAdmin.robot
+Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags critical
+
*** Variables ***
-${SHARD_NAME} default
-${SHARD_TYPE} config
-${TRANSACTION_RATE_1K} ${1000}
-${DURATION} ${60}
-${SIMPLE_TX} ${False}
-${CHAINED_TX} ${True}
-${MODULE_SHARD_PREFIX} prefix-
+${SHARD_NAME} default
+${SHARD_TYPE} config
+${TRANSACTION_RATE_1K} ${1000}
+${DURATION} ${60}
+${SIMPLE_TX} ${False}
+${CHAINED_TX} ${True}
+${MODULE_SHARD_PREFIX} prefix-
+
*** Test Cases ***
Get_Shard_Role
Subscribe_Listener_To_Leader
[Documentation] Subscribe listener to leader.
${all_indices} = ClusterManagement.List_All_Indices
- ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=${SHARD_NAME} shard_type=${SHARD_TYPE} member_index_list=${all_indices} verify_restconf=False
+ ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard
+ ... shard_name=${SHARD_NAME}
+ ... shard_type=${SHARD_TYPE}
+ ... member_index_list=${all_indices}
+ ... verify_restconf=False
MdsalLowlevel.Subscribe_Dtcl ${leader}
BuiltIn.Sleep 5s
${copy_matches} = MdsalLowlevel.Unsubscribe_Dtcl_No_Tx ${leader}
Subscribe_Listener_To_Follower
[Documentation] Subscribe listener to follower.
${all_indices} = ClusterManagement.List_All_Indices
- ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=${SHARD_NAME} shard_type=${SHARD_TYPE} member_index_list=${all_indices} verify_restconf=False
+ ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard
+ ... shard_name=${SHARD_NAME}
+ ... shard_type=${SHARD_TYPE}
+ ... member_index_list=${all_indices}
+ ... verify_restconf=False
${follower_idx} = Collections.Get_From_List ${follower_list} ${0}
MdsalLowlevel.Subscribe_Dtcl ${follower_idx}
BuiltIn.Sleep 5s
${shard_name} = BuiltIn.Set_Variable ${SHARD_NAME}
${shard_type} = BuiltIn.Set_Variable ${SHARD_TYPE}
${all_indices} = ClusterManagement.List_All_Indices
- ${old_leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=${SHARD_NAME} shard_type=${SHARD_TYPE} member_index_list=${all_indices} verify_restconf=False
+ ${old_leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard
+ ... shard_name=${SHARD_NAME}
+ ... shard_type=${SHARD_TYPE}
+ ... member_index_list=${all_indices}
+ ... verify_restconf=False
${follower1} = Collections.Get_From_List ${follower_list} ${0}
ClusterAdmin.Make_Leader_Local ${follower1} ${shard_name} ${shard_type}
- ${leader} ${follower_list} = BuiltIn.Wait_Until_Keyword_Succeeds 60s 5s ClusterManagement.Verify_Shard_Leader_Elected ${shard_name}
- ... ${shard_type} ${True} ${old_leader} member_index_list=${EMPTY}
+ ${leader} ${follower_list} = BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 60s
+ ... 5s
+ ... ClusterManagement.Verify_Shard_Leader_Elected
+ ... ${shard_name}
+ ... ${shard_type}
+ ... ${True}
+ ... ${old_leader}
+ ... member_index_list=${EMPTY}
BuiltIn.Should_Be_Equal_As_Numbers ${follower1} ${leader}
Remove_Leader_Shard_Replica_And_Add_It_Back
${shard_name} = BuiltIn.Set_Variable ${SHARD_NAME}
${shard_type} = BuiltIn.Set_Variable ${SHARD_TYPE}
${all_indices} = ClusterManagement.List_All_Indices
- ${old_leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=${shard_name} shard_type=${shard_type} member_index_list=${all_indices} verify_restconf=False
+ ${old_leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard
+ ... shard_name=${shard_name}
+ ... shard_type=${shard_type}
+ ... member_index_list=${all_indices}
+ ... verify_restconf=False
ClusterAdmin.Remove_Shard_Replica ${old_leader} ${shard_name} member-${old_leader} ${shard_type}
- BuiltIn.Wait_Until_Keyword_Succeeds 60s 5s DdbCommons.Verify_Shard_Replica_Not_Present ${old_leader} ${shard_name} ${shard_type}
- ${actual_leader} ${actual_follower_list} = BuiltIn.Wait_Until_Keyword_Succeeds 60s 5s ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=${shard_name}
- ... verify_restconf=False shard_type=${shard_type} member_index_list=${follower_list}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 60s
+ ... 5s
+ ... DdbCommons.Verify_Shard_Replica_Not_Present
+ ... ${old_leader}
+ ... ${shard_name}
+ ... ${shard_type}
+ ${actual_leader} ${actual_follower_list} = BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 60s
+ ... 5s
+ ... ClusterManagement.Get_Leader_And_Followers_For_Shard
+ ... shard_name=${shard_name}
+ ... verify_restconf=False
+ ... shard_type=${shard_type}
+ ... member_index_list=${follower_list}
BuiltIn.Should_Not_Be_Equal_As_Numbers ${old_leader} ${actual_leader}
- BuiltIn.Wait_Until_Keyword_Succeeds 60s 5s ClusterAdmin.Add_Shard_Replica ${old_leader} ${shard_name} ${shard_type}
- BuiltIn.Wait_Until_Keyword_Succeeds 60s 5s ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=${shard_name} shard_type=${shard_type} member_index_list=${all_indices}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 60s
+ ... 5s
+ ... ClusterAdmin.Add_Shard_Replica
+ ... ${old_leader}
+ ... ${shard_name}
+ ... ${shard_type}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 60s
+ ... 5s
+ ... ClusterManagement.Get_Leader_And_Followers_For_Shard
+ ... shard_name=${shard_name}
+ ... shard_type=${shard_type}
+ ... member_index_list=${all_indices}
... verify_restconf=False
Remove_Follower_Shard_Replica_And_Add_It_Back
${shard_name} = BuiltIn.Set_Variable ${SHARD_NAME}
${shard_type} = BuiltIn.Set_Variable ${SHARD_TYPE}
${all_indices} = ClusterManagement.List_All_Indices
- ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=${shard_name} shard_type=${shard_type} member_index_list=${all_indices} verify_restconf=False
+ ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard
+ ... shard_name=${shard_name}
+ ... shard_type=${shard_type}
+ ... member_index_list=${all_indices}
+ ... verify_restconf=False
${follower1} = Collections.Get_From_List ${follower_list} ${0}
ClusterAdmin.Remove_Shard_Replica ${follower1} ${shard_name} member-${follower1} ${shard_type}
- BuiltIn.Wait_Until_Keyword_Succeeds 60s 5s DdbCommons.Verify_Shard_Replica_Not_Present ${follower1} ${shard_name} ${shard_type}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 60s
+ ... 5s
+ ... DdbCommons.Verify_Shard_Replica_Not_Present
+ ... ${follower1}
+ ... ${shard_name}
+ ... ${shard_type}
${new_indices_list} = ClusterManagement.List_Indices_Minus_Member ${follower1}
- ClusterManagement.Verify_Shard_Leader_Elected ${shard_name} ${shard_type} ${False} ${leader} member_index_list=${new_indices_list}
- BuiltIn.Wait_Until_Keyword_Succeeds 60s 5s ClusterAdmin.Add_Shard_Replica ${follower1} ${shard_name} ${shard_type}
- BuiltIn.Wait_Until_Keyword_Succeeds 60s 5s ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=${shard_name} shard_type=${shard_type} member_index_list=${all_indices}
+ ClusterManagement.Verify_Shard_Leader_Elected
+ ... ${shard_name}
+ ... ${shard_type}
+ ... ${False}
+ ... ${leader}
+ ... member_index_list=${new_indices_list}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 60s
+ ... 5s
+ ... ClusterAdmin.Add_Shard_Replica
+ ... ${follower1}
+ ... ${shard_name}
+ ... ${shard_type}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 60s
+ ... 5s
+ ... ClusterManagement.Get_Leader_And_Followers_For_Shard
+ ... shard_name=${shard_name}
+ ... shard_type=${shard_type}
+ ... member_index_list=${all_indices}
... verify_restconf=False
Write_Transactions_One_Node_Leader
[Documentation] Write transactions.
${all_indices} = ClusterManagement.List_All_Indices
- ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=${SHARD_NAME} shard_type=${SHARD_TYPE} member_index_list=${all_indices} verify_restconf=False
+ ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard
+ ... shard_name=${SHARD_NAME}
+ ... shard_type=${SHARD_TYPE}
+ ... member_index_list=${all_indices}
+ ... verify_restconf=False
${leader_idx_as_list} = BuiltIn.Create_List ${leader}
${leader_ip_as_list} = ClusterManagement.Resolve_IP_Address_For_Members ${leader_idx_as_list}
- MdsalLowlevelPy.Start_Write_Transactions_On_Nodes ${leader_ip_as_list} ${leader_idx_as_list} ${MODULE_SHARD_PREFIX} ${DURATION} ${TRANSACTION_RATE_1K} chained_flag=${CHAINED_TX}
+ MdsalLowlevelPy.Start_Write_Transactions_On_Nodes
+ ... ${leader_ip_as_list}
+ ... ${leader_idx_as_list}
+ ... ${MODULE_SHARD_PREFIX}
+ ... ${DURATION}
+ ... ${TRANSACTION_RATE_1K}
+ ... chained_flag=${CHAINED_TX}
${resp_list} = MdsalLowlevelPy.Wait_For_Transactions
FOR ${resp} IN @{resp_list}
TemplatedRequests.Check_Status_Code ${resp}[2]
Write_Transactions_One_Node_Follower
[Documentation] Write transactions.
${all_indices} = ClusterManagement.List_All_Indices
- ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=${SHARD_NAME} shard_type=${SHARD_TYPE} member_index_list=${all_indices} verify_restconf=False
+ ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard
+ ... shard_name=${SHARD_NAME}
+ ... shard_type=${SHARD_TYPE}
+ ... member_index_list=${all_indices}
+ ... verify_restconf=False
${follower_idx} = Collections.Get_From_List ${follower_list} ${0}
${follower_idx_as_list} = BuiltIn.Create_List ${follower_idx}
${follower_ip_as_list} = ClusterManagement.Resolve_IP_Address_For_Members ${follower_idx_as_list}
- MdsalLowlevelPy.Start_Write_Transactions_On_Nodes ${follower_ip_as_list} ${follower_idx_as_list} ${MODULE_SHARD_PREFIX} ${DURATION} ${TRANSACTION_RATE_1K} chained_flag=${CHAINED_TX}
+ MdsalLowlevelPy.Start_Write_Transactions_On_Nodes
+ ... ${follower_ip_as_list}
+ ... ${follower_idx_as_list}
+ ... ${MODULE_SHARD_PREFIX}
+ ... ${DURATION}
+ ... ${TRANSACTION_RATE_1K}
+ ... chained_flag=${CHAINED_TX}
${resp_list} = MdsalLowlevelPy.Wait_For_Transactions
FOR ${resp} IN @{resp_list}
TemplatedRequests.Check_Status_Code ${resp}[2]
[Documentation] Write transactions.
${all_indices} = ClusterManagement.List_All_Indices
${all_ip_list} = ClusterManagement.Resolve_IP_Address_For_Members ${all_indices}
- MdsalLowlevelPy.Start_Write_Transactions_On_Nodes ${all_ip_list} ${all_indices} ${MODULE_SHARD_PREFIX} ${DURATION} ${TRANSACTION_RATE_1K} chained_flag=${CHAINED_TX}
+ MdsalLowlevelPy.Start_Write_Transactions_On_Nodes
+ ... ${all_ip_list}
+ ... ${all_indices}
+ ... ${MODULE_SHARD_PREFIX}
+ ... ${DURATION}
+ ... ${TRANSACTION_RATE_1K}
+ ... chained_flag=${CHAINED_TX}
${resp_list} = MdsalLowlevelPy.Wait_For_Transactions
FOR ${resp} IN @{resp_list}
TemplatedRequests.Check_Status_Code ${resp}[2]
*** Settings ***
-Documentation DOMDataBroker testing: Module based shards sanity suite
+Documentation DOMDataBroker testing: Module based shards sanity suite
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... The goal is to call several basic rpc form ClusterAdmin.robot and
-... MdsalLowlevel.robot to ensute that those rpcs can be safely used in
-... other suites.
-... It also verify the ability of the odl-controller-test-app to perform
-... several activities.
-Suite Setup BuiltIn.Run_Keywords SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
-... AND DdbCommons.Create_Prefix_Based_Shard_And_Verify
-Suite Teardown BuiltIn.Run_Keywords DdbCommons.Remove_Prefix_Based_Shard_And_Verify
-... AND SSHLibrary.Close_All_Connections
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Library SSHLibrary
-Library ${CURDIR}/../../../libraries/MdsalLowlevelPy.py
-Resource ${CURDIR}/../../../libraries/ClusterAdmin.robot
-Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+... The goal is to call several basic rpc form ClusterAdmin.robot and
+... MdsalLowlevel.robot to ensute that those rpcs can be safely used in
+... other suites.
+... It also verify the ability of the odl-controller-test-app to perform
+... several activities.
+
+Library SSHLibrary
+Library ${CURDIR}/../../../libraries/MdsalLowlevelPy.py
+Resource ${CURDIR}/../../../libraries/ClusterAdmin.robot
+Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup BuiltIn.Run_Keywords SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
+... AND DdbCommons.Create_Prefix_Based_Shard_And_Verify
+Suite Teardown BuiltIn.Run_Keywords DdbCommons.Remove_Prefix_Based_Shard_And_Verify
+... AND SSHLibrary.Close_All_Connections
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags critical
+
*** Variables ***
-${PREF_BASED_SHARD} id-ints
-${SHARD_TYPE} config
-${TRANSACTION_RATE_1K} ${1000}
-${DURATION} ${30}
-${SIMPLE_TX} ${False}
-${CHAINED_TX} ${True}
-${ID_PREFIX} prefix-
+${PREF_BASED_SHARD} id-ints
+${SHARD_TYPE} config
+${TRANSACTION_RATE_1K} ${1000}
+${DURATION} ${30}
+${SIMPLE_TX} ${False}
+${CHAINED_TX} ${True}
+${ID_PREFIX} prefix-
+
*** Test Cases ***
Get_Prefix_Shard_Role
Subscribe_Listener_To_Leader
[Documentation] Subscribe listener to leader.
${all_indices} = ClusterManagement.List_All_Indices
- ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=${SHARD_NAME} shard_type=${SHARD_TYPE} member_index_list=${all_indices} verify_restconf=False
+ ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard
+ ... shard_name=${SHARD_NAME}
+ ... shard_type=${SHARD_TYPE}
+ ... member_index_list=${all_indices}
+ ... verify_restconf=False
MdsalLowlevel.Subscribe_Ddtl ${leader}
BuiltIn.Sleep 5s
${copy_matches} = MdsalLowlevel.Unsubscribe_Ddtl_No_Tx ${leader}
Subscribe_Listener_To_Follower
[Documentation] Subscribe listener to follower.
${all_indices} = ClusterManagement.List_All_Indices
- ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=${SHARD_NAME} shard_type=${SHARD_TYPE} member_index_list=${all_indices} verify_restconf=False
+ ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard
+ ... shard_name=${SHARD_NAME}
+ ... shard_type=${SHARD_TYPE}
+ ... member_index_list=${all_indices}
+ ... verify_restconf=False
${follower_idx} = Collections.Get_From_List ${follower_list} ${0}
MdsalLowlevel.Subscribe_Ddtl ${follower_idx}
BuiltIn.Sleep 5s
${shard_name} = BuiltIn.Set_Variable ${PREF_BASED_SHARD}
${shard_type} = BuiltIn.Set_Variable ${SHARD_TYPE}
${all_indices} = ClusterManagement.List_All_Indices
- ${old_leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=${shard_name}!! shard_type=${shard_type} member_index_list=${all_indices} verify_restconf=False
+ ${old_leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard
+ ... shard_name=${shard_name}!!
+ ... shard_type=${shard_type}
+ ... member_index_list=${all_indices}
+ ... verify_restconf=False
${follower1} = Collections.Get_From_List ${follower_list} ${0}
MdsalLowlevel.Become_Prefix_Leader ${follower1} ${shard_name}
- ${leader} ${follower_list} = BuiltIn.Wait_Until_Keyword_Succeeds 60s 5s ClusterManagement.Verify_Shard_Leader_Elected ${shard_name}!!
- ... ${shard_type} ${True} ${old_leader} member_index_list=${EMPTY}
+ ${leader} ${follower_list} = BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 60s
+ ... 5s
+ ... ClusterManagement.Verify_Shard_Leader_Elected
+ ... ${shard_name}!!
+ ... ${shard_type}
+ ... ${True}
+ ... ${old_leader}
+ ... member_index_list=${EMPTY}
BuiltIn.Should_Be_Equal_As_Numbers ${follower1} ${leader}
Remove_Leader_Prefix_Shard_Replica_And_Add_It_Back
${shard_name} = BuiltIn.Set_Variable ${PREF_BASED_SHARD}
${shard_type} = BuiltIn.Set_Variable ${SHARD_TYPE}
${all_indices} = ClusterManagement.List_All_Indices
- ${old_leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=${shard_name}!! shard_type=${shard_type} member_index_list=${all_indices} verify_restconf=False
+ ${old_leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard
+ ... shard_name=${shard_name}!!
+ ... shard_type=${shard_type}
+ ... member_index_list=${all_indices}
+ ... verify_restconf=False
ClusterAdmin.Remove_Prefix_Shard_Replica ${old_leader} ${shard_name} member-${old_leader} ${shard_type}
- BuiltIn.Wait_Until_Keyword_Succeeds 60s 5s Verify_Shard_Replica_Not_Present ${old_leader} ${shard_name}!! ${shard_type}
- ${actual_leader} ${actual_follower_list} = BuiltIn.Wait_Until_Keyword_Succeeds 60s 5s ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=${shard_name}!!
- ... verify_restconf=False shard_type=${shard_type} member_index_list=${follower_list}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 60s
+ ... 5s
+ ... Verify_Shard_Replica_Not_Present
+ ... ${old_leader}
+ ... ${shard_name}!!
+ ... ${shard_type}
+ ${actual_leader} ${actual_follower_list} = BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 60s
+ ... 5s
+ ... ClusterManagement.Get_Leader_And_Followers_For_Shard
+ ... shard_name=${shard_name}!!
+ ... verify_restconf=False
+ ... shard_type=${shard_type}
+ ... member_index_list=${follower_list}
BuiltIn.Should_Not_Be_Equal_As_Numbers ${old_leader} ${actual_leader}
- BuiltIn.Wait_Until_Keyword_Succeeds 60s 5s ClusterAdmin.Add_Prefix_Shard_Replica ${old_leader} ${shard_name} ${shard_type}
- BuiltIn.Wait_Until_Keyword_Succeeds 60s 5s ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=${shard_name}!! shard_type=${shard_type} member_index_list=${all_indices}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 60s
+ ... 5s
+ ... ClusterAdmin.Add_Prefix_Shard_Replica
+ ... ${old_leader}
+ ... ${shard_name}
+ ... ${shard_type}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 60s
+ ... 5s
+ ... ClusterManagement.Get_Leader_And_Followers_For_Shard
+ ... shard_name=${shard_name}!!
+ ... shard_type=${shard_type}
+ ... member_index_list=${all_indices}
... verify_restconf=False
Remove_Follower_Prefix_Shard_Replica_And_Add_It_Back
${shard_name} = BuiltIn.Set_Variable ${PREF_BASED_SHARD}
${shard_type} = BuiltIn.Set_Variable ${SHARD_TYPE}
${all_indices} = ClusterManagement.List_All_Indices
- ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=${shard_name}!! shard_type=${shard_type} member_index_list=${all_indices} verify_restconf=False
+ ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard
+ ... shard_name=${shard_name}!!
+ ... shard_type=${shard_type}
+ ... member_index_list=${all_indices}
+ ... verify_restconf=False
${follower1} = Collections.Get_From_List ${follower_list} ${0}
ClusterAdmin.Remove_Prefix_Shard_Replica ${follower1} ${shard_name} member-${follower1} ${shard_type}
- BuiltIn.Wait_Until_Keyword_Succeeds 60s 5s DdbCommons.Verify_Shard_Replica_Not_Present ${follower1} ${shard_name}!! ${shard_type}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 60s
+ ... 5s
+ ... DdbCommons.Verify_Shard_Replica_Not_Present
+ ... ${follower1}
+ ... ${shard_name}!!
+ ... ${shard_type}
${new_indices_list} = ClusterManagement.List_Indices_Minus_Member ${follower1}
- ClusterManagement.Verify_Shard_Leader_Elected ${shard_name}!! ${shard_type} ${False} ${leader} member_index_list=${new_indices_list}
- BuiltIn.Wait_Until_Keyword_Succeeds 60s 5s ClusterAdmin.Add_Prefix_Shard_Replica ${follower1} ${shard_name} ${shard_type}
- BuiltIn.Wait_Until_Keyword_Succeeds 60s 5s ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=${shard_name}!! shard_type=${shard_type} member_index_list=${all_indices}
+ ClusterManagement.Verify_Shard_Leader_Elected
+ ... ${shard_name}!!
+ ... ${shard_type}
+ ... ${False}
+ ... ${leader}
+ ... member_index_list=${new_indices_list}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 60s
+ ... 5s
+ ... ClusterAdmin.Add_Prefix_Shard_Replica
+ ... ${follower1}
+ ... ${shard_name}
+ ... ${shard_type}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 60s
+ ... 5s
+ ... ClusterManagement.Get_Leader_And_Followers_For_Shard
+ ... shard_name=${shard_name}!!
+ ... shard_type=${shard_type}
+ ... member_index_list=${all_indices}
... verify_restconf=False
Produce_Transactions_One_Node_Leader
[Documentation] Produce transactions.
${all_indices} = ClusterManagement.List_All_Indices
- ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=${SHARD_NAME} shard_type=${SHARD_TYPE} member_index_list=${all_indices} verify_restconf=False
+ ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard
+ ... shard_name=${SHARD_NAME}
+ ... shard_type=${SHARD_TYPE}
+ ... member_index_list=${all_indices}
+ ... verify_restconf=False
${leader_idx_as_list} = BuiltIn.Create_List ${leader}
${leader_ip_as_list} = ClusterManagement.Resolve_IP_Address_For_Members ${leader_idx_as_list}
- MdsalLowlevelPy.Start_Produce_Transactions_On_Nodes ${leader_ip_as_list} ${leader_idx_as_list} ${ID_PREFIX} ${DURATION} ${TRANSACTION_RATE_1K}
+ MdsalLowlevelPy.Start_Produce_Transactions_On_Nodes
+ ... ${leader_ip_as_list}
+ ... ${leader_idx_as_list}
+ ... ${ID_PREFIX}
+ ... ${DURATION}
+ ... ${TRANSACTION_RATE_1K}
${resp_list} = MdsalLowlevelPy.Wait_For_Transactions
FOR ${resp} IN @{resp_list}
TemplatedRequests.Check_Status_Code ${resp}[2]
Produce_Transactions_One_Node_Follower
[Documentation] Produce transactions.
${all_indices} = ClusterManagement.List_All_Indices
- ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=${SHARD_NAME} shard_type=${SHARD_TYPE} member_index_list=${all_indices} verify_restconf=False
+ ${leader} ${follower_list} = ClusterManagement.Get_Leader_And_Followers_For_Shard
+ ... shard_name=${SHARD_NAME}
+ ... shard_type=${SHARD_TYPE}
+ ... member_index_list=${all_indices}
+ ... verify_restconf=False
${follower_idx} = Collections.Get_From_List ${follower_list} ${0}
${follower_idx_as_list} = BuiltIn.Create_List ${follower_idx}
${follower_ip_as_list} = ClusterManagement.Resolve_IP_Address_For_Members ${follower_idx_as_list}
- MdsalLowlevelPy.Start_Produce_Transactions_On_Nodes ${follower_ip_as_list} ${follower_idx_as_list} ${ID_PREFIX} ${DURATION} ${TRANSACTION_RATE_1K}
+ MdsalLowlevelPy.Start_Produce_Transactions_On_Nodes
+ ... ${follower_ip_as_list}
+ ... ${follower_idx_as_list}
+ ... ${ID_PREFIX}
+ ... ${DURATION}
+ ... ${TRANSACTION_RATE_1K}
${resp_list} = MdsalLowlevelPy.Wait_For_Transactions
FOR ${resp} IN @{resp_list}
TemplatedRequests.Check_Status_Code ${resp}[2]
[Documentation] Produce transactions.
${all_indices} = ClusterManagement.List_All_Indices
${all_ip_list} = ClusterManagement.Resolve_IP_Address_For_Members ${all_indices}
- MdsalLowlevelPy.Start_Produce_Transactions_On_Nodes ${all_ip_list} ${all_indices} ${ID_PREFIX} ${DURATION} ${TRANSACTION_RATE_1K}
+ MdsalLowlevelPy.Start_Produce_Transactions_On_Nodes
+ ... ${all_ip_list}
+ ... ${all_indices}
+ ... ${ID_PREFIX}
+ ... ${DURATION}
+ ... ${TRANSACTION_RATE_1K}
${resp_list} = MdsalLowlevelPy.Wait_For_Transactions
FOR ${resp} IN @{resp_list}
TemplatedRequests.Check_Status_Code ${resp}[2]
*** Settings ***
-Documentation DOMDataBroker testing: Explicit Leader Movement
+Documentation DOMDataBroker testing: Explicit Leader Movement
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... The goal is to ensure that applications do not observe disruption when a shard
-... leader is moved as the result of explicit application request. This is performed
-... by having a steady-stream producer execute operations against the shard and then
-... initiate shard leader shutdown, then the producer is shut down cleanly.
-Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Test Template DdbCommons.Explicit_Leader_Movement_Test_Templ
-Library SSHLibrary
-Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+... The goal is to ensure that applications do not observe disruption when a shard
+... leader is moved as the result of explicit application request. This is performed
+... by having a steady-stream producer execute operations against the shard and then
+... initiate shard leader shutdown, then the producer is shut down cleanly.
+
+Library SSHLibrary
+Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+Test Template DdbCommons.Explicit_Leader_Movement_Test_Templ
+
+Default Tags critical
+
*** Test Cases ***
Local_To_Remote_Movement
[Documentation] Leader moves from local to remote node during transaction producing.
local remote
-
Restart1
[Documentation] Restart odl
[Template] ${EMPTY}
DdbCommons.Restart_Test_Templ
-
Remote_To_Remote_Movement
[Documentation] Leader moves from one remote to other remote node during transaction producing.
remote remote
-
Restart2
[Documentation] Restart odl
[Template] ${EMPTY}
DdbCommons.Restart_Test_Templ
-
Remote_To_Local_Movement
[Documentation] Leader moves from remote to local node during transaction producing.
remote local
*** Settings ***
-Documentation DOMDataBroker testing: Explicit Leader Movement
+Documentation DOMDataBroker testing: Explicit Leader Movement
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... The goal is to ensure that applications do not observe disruption when a shard
-... leader is moved as the result of explicit application request. This is performed
-... by having a steady-stream producer execute operations against the shard and then
-... initiate shard leader shutdown, then the producer is shut down cleanly.
-Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Library SSHLibrary
-Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
-Resource ${CURDIR}/../../../libraries/KarafKeywords.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+... The goal is to ensure that applications do not observe disruption when a shard
+... leader is moved as the result of explicit application request. This is performed
+... by having a steady-stream producer execute operations against the shard and then
+... initiate shard leader shutdown, then the producer is shut down cleanly.
+
+Library SSHLibrary
+Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+Resource ${CURDIR}/../../../libraries/KarafKeywords.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags critical
+
*** Variables ***
# TODO: change back to 24h when releng has more granular steps to kill VMs than days; now 23h=82800s
-${LONGEVITY_TEST_DURATION_IN_SECS} 82800
-@{MOVEMENT_DIRECTION_LIST} remote local remote
+${LONGEVITY_TEST_DURATION_IN_SECS} 82800
+@{MOVEMENT_DIRECTION_LIST} remote local remote
+
*** Test Cases ***
Explicit_Leader_Movement_Test
[Documentation] Leader move for 24 hours from one node to another
- WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout ${LONGEVITY_TEST_DURATION_IN_SECS} 5s Test_Scenario
+ WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout
+ ... ${LONGEVITY_TEST_DURATION_IN_SECS}
+ ... 5s
+ ... Test_Scenario
+
*** Keywords ***
Test_Scenario
*** Settings ***
-Documentation DOMDataBroker testing: Explicit Leader Movement
+Documentation DOMDataBroker testing: Explicit Leader Movement
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... The goal is to ensure that applications do not observe disruption when a shard
-... leader is moved as the result of explicit application request. This is performed
-... by having a steady-stream producer execute operations against the shard and then
-... initiate shard leader shutdown, then the producer is shut down cleanly.
-Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup BuiltIn.Run_Keywords SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-... AND DdbCommons.Create_Prefix_Based_Shard_And_Verify
-Test Teardown BuiltIn.Run_Keywords DdbCommons.Remove_Prefix_Based_Shard_And_Verify
-... AND SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Test Template DdbCommons.Explicit_Leader_Movement_PrefBasedShard_Test_Templ
-Library SSHLibrary
-Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+... The goal is to ensure that applications do not observe disruption when a shard
+... leader is moved as the result of explicit application request. This is performed
+... by having a steady-stream producer execute operations against the shard and then
+... initiate shard leader shutdown, then the producer is shut down cleanly.
+
+Library SSHLibrary
+Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup BuiltIn.Run_Keywords SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+... AND DdbCommons.Create_Prefix_Based_Shard_And_Verify
+Test Teardown BuiltIn.Run_Keywords DdbCommons.Remove_Prefix_Based_Shard_And_Verify
+... AND SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+Test Template DdbCommons.Explicit_Leader_Movement_PrefBasedShard_Test_Templ
+
+Default Tags critical
+
*** Test Cases ***
Local_To_Remote_Movement
[Documentation] Leader moves from local to remote node during transaction producing.
local remote
-
Restart1
[Documentation] Restart odl.
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
[Template] ${EMPTY}
+ [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
DdbCommons.Restart_Test_Templ
[Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-
Remote_To_Remote_Movement
[Documentation] Leader moves from one remote to other remote node during transaction producing.
remote remote
-
Restart2
[Documentation] Restart odl.
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
[Template] ${EMPTY}
+ [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
DdbCommons.Restart_Test_Templ
[Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-
Remote_To_Local_Movement
[Documentation] Leader moves from remote to local node during transaction producing.
remote local
*** Settings ***
-Documentation DOMDataBroker testing: Leader Isolation
+Documentation DOMDataBroker testing: Leader Isolation
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... The goal is to ensure the datastore succeeds in basic isolation/rejoin scenario,
-... simulating either a network partition, or a prolonged GC pause.
-Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Test Template DdbCommons.Leader_Isolation_Test_Templ
-Library SSHLibrary
-Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+... The goal is to ensure the datastore succeeds in basic isolation/rejoin scenario,
+... simulating either a network partition, or a prolonged GC pause.
+
+Library SSHLibrary
+Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+Test Template DdbCommons.Leader_Isolation_Test_Templ
+
+Default Tags critical
+
*** Test Cases ***
Healing_Within_Request_Timeout
[Documentation] The isolated node (leader) is rejoined as soon as new leader is elected and
... and within request timeout.
${HEAL_WITHIN_REQUEST_TIMEOUT}
-
Restart
[Documentation] Restart odl
[Template] ${EMPTY}
DdbCommons.Restart_Test_Templ
-
Healing_After_Request_Timeout
[Documentation] The isolated node (leader) is rejoined after request timeout.
${HEAL_AFTER_REQUEST_TIMEOUT}
*** Settings ***
-Documentation DOMDataBroker testing: Leader Isolation
+Documentation DOMDataBroker testing: Leader Isolation
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... The goal is to ensure the datastore succeeds in basic isolation/rejoin scenario,
-... simulating either a network partition, or a prolonged GC pause.
-Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup BuiltIn.Run_Keywords SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-... AND DdbCommons.Create_Prefix_Based_Shard_And_Verify
-Test Teardown BuiltIn.Run_Keywords DdbCommons.Remove_Prefix_Based_Shard_And_Verify
-... AND SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Test Template DdbCommons.Leader_Isolation_PrefBasedShard_Test_Templ
-Library SSHLibrary
-Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+... The goal is to ensure the datastore succeeds in basic isolation/rejoin scenario,
+... simulating either a network partition, or a prolonged GC pause.
+
+Library SSHLibrary
+Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup BuiltIn.Run_Keywords SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+... AND DdbCommons.Create_Prefix_Based_Shard_And_Verify
+Test Teardown BuiltIn.Run_Keywords DdbCommons.Remove_Prefix_Based_Shard_And_Verify
+... AND SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+Test Template DdbCommons.Leader_Isolation_PrefBasedShard_Test_Templ
+
+Default Tags critical
+
*** Test Cases ***
Healing_Within_Request_Timeout
[Documentation] The isolated node (leader) is rejoined as soon as new leader is elected and
... and within request timeout.
${HEAL_WITHIN_REQUEST_TIMEOUT}
-
Restart
[Documentation] Restart odl.
[Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
DdbCommons.Restart_Test_Templ
[Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-
Healing_After_Request_Timeout
[Documentation] The isolated node (leader) is rejoined after request timeout.
${HEAL_AFTER_REQUEST_TIMEOUT}
*** Settings ***
-Documentation DOMDataBroker testing: Listener Stability for module-based shards
+Documentation DOMDataBroker testing: Listener Stability for module-based shards
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... The goal is to ensure listeners do no observe disruption when the leader moves.
-... This is performed by having a steady stream of transactions being observed by
-... the listeners and having the leader move.
-Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Test Template DdbCommons.Listener_Stability_Test_Templ
-Library SSHLibrary
-Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+... The goal is to ensure listeners do no observe disruption when the leader moves.
+... This is performed by having a steady stream of transactions being observed by
+... the listeners and having the leader move.
+
+Library SSHLibrary
+Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+Test Template DdbCommons.Listener_Stability_Test_Templ
+
+Default Tags critical
+
*** Test Cases ***
Move_Leader_From_Listener_Local_To_Remote
[Documentation] Listener runs on leader node when leader is moved to remote node.
local remote
-
Restart_1
[Documentation] Restart odl.
[Template] ${EMPTY}
DdbCommons.Restart_Test_Templ
-
Move_Leader_From_Listener_Remote_To_Other_Remote
[Documentation] Listener runs on follower node when leader is moved to the third node.
remote remote
-
Restart_2
[Documentation] Restart odl.
[Template] ${EMPTY}
DdbCommons.Restart_Test_Templ
-
Move_Leader_From_Listener_Remote_To_Local
[Documentation] Listener runs on follower node when leader is moved to local node.
remote local
*** Settings ***
-Documentation DOMDataBroker testing: Listener Stability for prefix-based shards
+Documentation DOMDataBroker testing: Listener Stability for prefix-based shards
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... The goal is to ensure listeners do no observe disruption when the leader moves.
-... This is performed by having a steady stream of transactions being observed by
-... the listeners and having the leader move.
-Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup BuiltIn.Run_Keywords SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-... AND DdbCommons.Create_Prefix_Based_Shard_And_Verify
-Test Teardown BuiltIn.Run_Keywords DdbCommons.Remove_Prefix_Based_Shard_And_Verify
-... AND SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Test Template DdbCommons.Listener_Stability_PrefBasedShard_Test_Templ
-Library SSHLibrary
-Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+... The goal is to ensure listeners do no observe disruption when the leader moves.
+... This is performed by having a steady stream of transactions being observed by
+... the listeners and having the leader move.
+
+Library SSHLibrary
+Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup BuiltIn.Run_Keywords SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+... AND DdbCommons.Create_Prefix_Based_Shard_And_Verify
+Test Teardown BuiltIn.Run_Keywords DdbCommons.Remove_Prefix_Based_Shard_And_Verify
+... AND SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+Test Template DdbCommons.Listener_Stability_PrefBasedShard_Test_Templ
+
+Default Tags critical
+
*** Test Cases ***
Move_Leader_From_Listener_Local_To_Remote
[Documentation] Listener runs on leader node when leader is moved to remote node.
local remote
-
Restart_1
[Documentation] Restart odl.
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
[Template] ${EMPTY}
+ [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
DdbCommons.Restart_Test_Templ
[Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-
Move_Leader_From_Listener_Remote_To_Other_Remote
[Documentation] Listener runs on follower node when leader is moved to the third node.
remote remote
-
Restart_2
[Documentation] Restart odl.
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
[Template] ${EMPTY}
+ [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
DdbCommons.Restart_Test_Templ
[Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-
Move_Leader_From_Listener_Remote_To_Local
[Documentation] Listener runs on follower node when leader is moved to local node.
remote local
*** Settings ***
-Documentation Unset tell-based protocol usage
+Documentation Unset tell-based protocol usage
...
-... Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... Suite stops all odl nodes, outcomment usage of tell-based protocol in
-... config file (means make it false by default) and starts all nodes again.
-Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
-Suite Teardown SSHLibrary.Close_All_Connections
-Default Tags critical
-Library SSHLibrary
-Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource ${CURDIR}/../../../libraries/ShardStability.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+... Suite stops all odl nodes, outcomment usage of tell-based protocol in
+... config file (means make it false by default) and starts all nodes again.
+
+Library SSHLibrary
+Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource ${CURDIR}/../../../libraries/ShardStability.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+
+Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
+Suite Teardown SSHLibrary.Close_All_Connections
+
+Default Tags critical
+
*** Variables ***
${DATASTORE_CFG} /${WORKSPACE}/${BUNDLEFOLDER}/etc/org.opendaylight.controller.cluster.datastore.cfg
+
*** Test Cases ***
Stop_All_Members
[Documentation] Stop every odl node.
Start_All_And_Sync
[Documentation] Start each member and wait for sync.
ClusterManagement.Start_Members_From_List_Or_All
- BuiltIn.Wait_Until_Keyword_Succeeds 60s 10s ClusterManagement.Run_Bash_Command_On_List_Or_All netstat -punta
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 60s
+ ... 10s
+ ... ClusterManagement.Run_Bash_Command_On_List_Or_All
+ ... netstat -punta
${index_list} = List_Indices_Or_All
FOR ${index} IN @{index_list}
- ${output} = ClusterManagement.Check_Bash_Command_On_Member command=sudo netstat -punta | grep 2550 | grep LISTEN member_index=${index}
+ ${output} = ClusterManagement.Check_Bash_Command_On_Member
+ ... command=sudo netstat -punta | grep 2550 | grep LISTEN
+ ... member_index=${index}
${listening} = Get Match ${output} LISTEN
- BuiltIn.Run Keyword If '${listening}' == 'None' ClusterManagement.Check_Bash_Command_On_Member command=pid=$(grep org.apache.karaf.main.Main | grep -v grep | tr -s ' ' | cut -f2 -d' '); sudo /usr/lib/jvm/java-1.8.0/bin/jstack -l ${pid} member_index=${index}
+ IF '${listening}' == 'None'
+ ClusterManagement.Check_Bash_Command_On_Member
+ ... command=pid=$(grep org.apache.karaf.main.Main | grep -v grep | tr -s ' ' | cut -f2 -d' '); sudo /usr/lib/jvm/java-1.8.0/bin/jstack -l ${pid}
+ ... member_index=${index}
+ END
END
- BuiltIn.Wait_Until_Keyword_Succeeds 60s 10s ShardStability.Shards_Stability_Get_Details ${DEFAULT_SHARD_LIST} verify_restconf=True
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 60s
+ ... 10s
+ ... ShardStability.Shards_Stability_Get_Details
+ ... ${DEFAULT_SHARD_LIST}
+ ... verify_restconf=True
+
*** Keywords ***
Get Match
- [Arguments] ${text} ${regexp} ${index}=0
[Documentation] Wrapper around String.Get Regexp Matches to return None if not found or the first match if found.
+ [Arguments] ${text} ${regexp} ${index}=0
@{matches} = String.Get Regexp Matches ${text} ${regexp}
${matches_length} = BuiltIn.Get Length ${matches}
BuiltIn.Set Suite Variable ${OS_MATCH} None
- BuiltIn.Run Keyword If ${matches_length} > ${index} BuiltIn.Set Suite Variable ${OS_MATCH} ${matches}[${index}]
- [Return] ${OS_MATCH}
+ IF ${matches_length} > ${index}
+ BuiltIn.Set Suite Variable ${OS_MATCH} ${matches}[${index}]
+ END
+ RETURN ${OS_MATCH}
*** Settings ***
-Documentation Set tell-based protocol usage
+Documentation Set tell-based protocol usage
...
-... Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... Suite stops all odl nodes, un-comment usage of tell-based protocol in
-... config file (means make it true) and starts all nodes again.
-Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
-Suite Teardown SSHLibrary.Close_All_Connections
-Default Tags critical
-Library SSHLibrary
-Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource ${CURDIR}/../../../libraries/ShardStability.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+... Suite stops all odl nodes, un-comment usage of tell-based protocol in
+... config file (means make it true) and starts all nodes again.
+
+Library SSHLibrary
+Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource ${CURDIR}/../../../libraries/ShardStability.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource ${CURDIR}/../../../libraries/controller/DdbCommons.robot
+
+Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
+Suite Teardown SSHLibrary.Close_All_Connections
+
+Default Tags critical
+
*** Variables ***
${DATASTORE_CFG} /${WORKSPACE}/${BUNDLEFOLDER}/etc/org.opendaylight.controller.cluster.datastore.cfg
+
*** Test Cases ***
Stop_All_Members
[Documentation] Stop every odl node.
Start_All_And_Sync
[Documentation] Start each member and wait for sync.
ClusterManagement.Start_Members_From_List_Or_All
- BuiltIn.Wait_Until_Keyword_Succeeds 300s 10s ShardStability.Shards_Stability_Get_Details ${DEFAULT_SHARD_LIST} verify_restconf=True
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 300s
+ ... 10s
+ ... ShardStability.Shards_Stability_Get_Details
+ ... ${DEFAULT_SHARD_LIST}
+ ... verify_restconf=True
ClusterManagement.Run_Bash_Command_On_List_Or_All ps -ef | grep java
*** Settings ***
-Documentation DOMNotificationBroker testing: No-loss rate
+Documentation DOMNotificationBroker testing: No-loss rate
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... Provides routing of YANG notifications from publishers to subscribers.
-... The purpose of this test is to determine the broker can forward messages without
-... loss. We do this on a single-node setup by incrementally adding publishers and
-... subscribers.
-Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Test Template DnbCommons.Dom_Notification_Broker_Test_Templ
-Library SSHLibrary
-Resource ${CURDIR}/../../../libraries/controller/DnbCommons.robot
-Resource ${CURDIR}/../../../libraries/MdsalLowlevel.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+... Provides routing of YANG notifications from publishers to subscribers.
+... The purpose of this test is to determine the broker can forward messages without
+... loss. We do this on a single-node setup by incrementally adding publishers and
+... subscribers.
+
+Library SSHLibrary
+Resource ${CURDIR}/../../../libraries/controller/DnbCommons.robot
+Resource ${CURDIR}/../../../libraries/MdsalLowlevel.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+Test Template DnbCommons.Dom_Notification_Broker_Test_Templ
+
+Default Tags critical
+
*** Variables ***
-${TC_DURATION_IN_SECONDS} ${300}
+${TC_DURATION_IN_SECONDS} ${300}
+
*** Test Cases ***
Notifications_rate_5k
${5000} ${TC_DURATION_IN_SECONDS}
-
Notifications_rate_20k
${20000} ${TC_DURATION_IN_SECONDS}
-
Notifications_rate_60k
${60000} ${TC_DURATION_IN_SECONDS}
*** Settings ***
-Documentation DOMNotificationBroker longevity testing: No-loss rate
+Documentation DOMNotificationBroker longevity testing: No-loss rate
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... Provides routing of YANG notifications from publishers to subscribers.
-... The purpose of this test is to determine the broker can forward messages without
-... loss. We do this on a single-node setup by incrementally adding publishers and
-... subscribers.
-Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Test Template DnbCommons.Dom_Notification_Broker_Test_Templ
-Library SSHLibrary
-Resource ${CURDIR}/../../../libraries/controller/DnbCommons.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+... Provides routing of YANG notifications from publishers to subscribers.
+... The purpose of this test is to determine the broker can forward messages without
+... loss. We do this on a single-node setup by incrementally adding publishers and
+... subscribers.
+
+Library SSHLibrary
+Resource ${CURDIR}/../../../libraries/controller/DnbCommons.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown http_timeout=125
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+Test Template DnbCommons.Dom_Notification_Broker_Test_Templ
+
+Default Tags critical
+
*** Variables ***
# TODO: change back to 24h when releng has more granular steps to kill VMs than days; now 23h=82800s
-${LONGEVITY_TEST_DURATION_IN_SECS} 82800
-${NOTIFICATION_RATE} ${60000}
+${LONGEVITY_TEST_DURATION_IN_SECS} 82800
+${NOTIFICATION_RATE} ${60000}
+
*** Test Cases ***
Notifications_longevity
*** Settings ***
-Documentation DOMRpcBroker testing: RPC Action Provider Partition And Heal
+Documentation DOMRpcBroker testing: RPC Action Provider Partition And Heal
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... This tests establishes that the RPC service for actions operates correctly
-... when faced with node failures.
-... This suite supports more than three node cluster setup too.
-Suite Setup Setup_Kw
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Library SSHLibrary
-Resource ${CURDIR}/../../../libraries/controller/DrbCommons.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/WaitForFailure.robot
+... This tests establishes that the RPC service for actions operates correctly
+... when faced with node failures.
+... This suite supports more than three node cluster setup too.
+
+Library SSHLibrary
+Resource ${CURDIR}/../../../libraries/controller/DrbCommons.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource ${CURDIR}/../../../libraries/WaitForFailure.robot
+
+Suite Setup Setup_Kw
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags critical
+
*** Variables ***
-@{INSTALLED_RPC_MEMEBER_IDX_LIST} ${1} ${2}
-${TESTED_MEMBER_WITHOUT_RPC_IDX} ${3}
+@{INSTALLED_RPC_MEMEBER_IDX_LIST} ${1} ${2}
+${TESTED_MEMBER_WITHOUT_RPC_IDX} ${3}
+
*** Test Cases ***
Register_Rpc_On_Two_Nodes
[Documentation] Invoke rpc get-contexted-constant on every node. When requested on the node with
... local instance the local value is expected. If invoked on the node with no local instance, any remote
... value is expected.
- WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout 20s 3s DrbCommons.Verify_Contexted_Constant_On_Active_Nodes
+ WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout
+ ... 20s
+ ... 3s
+ ... DrbCommons.Verify_Contexted_Constant_On_Active_Nodes
Unregister_Rpc_On_Each_Node
[Documentation] Inregister rpc on both nodes.
DrbCommons.Unregister_Action_On_Nodes ${INSTALLED_RPC_MEMEBER_IDX_LIST}
+
*** Keywords ***
Setup_Kw
[Documentation] Setup keyword. Create ${possible_constants} list with possible variables of remote constants.
*** Settings ***
-Documentation DOMRpcBroker testing: Action Provider Precedence
+Documentation DOMRpcBroker testing: Action Provider Precedence
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... The aim is to establish that remote action implementations have lower priority
-... than local ones, which is to say that any movement of actions on remote nodes
-... does not affect routing as long as a local implementation is available.
-Suite Setup Setup_Keyword
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Library SSHLibrary
-Resource ${CURDIR}/../../../libraries/controller/DrbCommons.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+... The aim is to establish that remote action implementations have lower priority
+... than local ones, which is to say that any movement of actions on remote nodes
+... does not affect routing as long as a local implementation is available.
+
+Library SSHLibrary
+Resource ${CURDIR}/../../../libraries/controller/DrbCommons.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup Setup_Keyword
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags critical
+
*** Variables ***
${UNREGISTERED_RPC_NODE} ${1}
+
*** Test Cases ***
Register_Rpc_On_Each_Node
[Documentation] Register routed rpc on each node of the cluster.
[Documentation] Unregister rpc on every node.
DrbCommons.Unregister_Action_On_Nodes ${all_indices}
+
*** Keywords ***
Setup_Keyword
[Documentation] Create a list of possible constant responses on the node with unregistered rpc.
*** Settings ***
-Documentation DOMRpcBroker testing: RPC Provider Partition And Heal
+Documentation DOMRpcBroker testing: RPC Provider Partition And Heal
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... This tests establishes that the RPC service operates correctly when faced
-... with node failures.
-... This suite supports more than three node cluster setup too.
-Suite Setup Setup_Kw
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Library SSHLibrary
-Resource ${CURDIR}/../../../libraries/controller/DrbCommons.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/WaitForFailure.robot
+... This tests establishes that the RPC service operates correctly when faced
+... with node failures.
+... This suite supports more than three node cluster setup too.
+
+Library SSHLibrary
+Resource ${CURDIR}/../../../libraries/controller/DrbCommons.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource ${CURDIR}/../../../libraries/WaitForFailure.robot
+
+Suite Setup Setup_Kw
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags critical
+
*** Variables ***
-@{INSTALLED_RPC_MEMEBER_IDX_LIST} ${1} ${2}
-${TESTED_MEMBER_WITHOUT_RPC_IDX} ${3}
+@{INSTALLED_RPC_MEMEBER_IDX_LIST} ${1} ${2}
+${TESTED_MEMBER_WITHOUT_RPC_IDX} ${3}
+
*** Test Cases ***
Register_Rpc_On_Two_Nodes
[Documentation] Invoke rpc get-constant on every node. When requested on the node with
... local instance the local value is expected. If invoked on the node with no local instance, any remote
... value is expected.
- WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout 20s 3s DrbCommons.Verify_Constant_On_Active_Nodes
+ WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout
+ ... 20s
+ ... 3s
+ ... DrbCommons.Verify_Constant_On_Active_Nodes
Unregister_Rpc_On_Each_Node
[Documentation] Inregister rpc on both nodes.
DrbCommons.Unregister_Rpc_On_Nodes ${INSTALLED_RPC_MEMEBER_IDX_LIST}
+
*** Keywords ***
Setup_Kw
[Documentation] Setup keyword. Create ${possible_constants} list with possible variables of remote constants.
*** Settings ***
-Documentation DOMRpcBroker testing: RPC Provider Partition And Heal
+Documentation DOMRpcBroker testing: RPC Provider Partition And Heal
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... This tests establishes that the RPC service operates correctly when faced
-... with node failures.
-... This suite supports more than three node cluster setup too.
-Suite Setup Setup_Kw
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Library SSHLibrary
-Resource ${CURDIR}/../../../libraries/controller/DrbCommons.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/WaitForFailure.robot
+... This tests establishes that the RPC service operates correctly when faced
+... with node failures.
+... This suite supports more than three node cluster setup too.
+
+Library SSHLibrary
+Resource ${CURDIR}/../../../libraries/controller/DrbCommons.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource ${CURDIR}/../../../libraries/WaitForFailure.robot
+
+Suite Setup Setup_Kw
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags critical
+
*** Variables ***
-@{INSTALLED_RPC_MEMEBER_IDX_LIST} ${1} ${2}
+@{INSTALLED_RPC_MEMEBER_IDX_LIST} ${1} ${2}
# TODO: Consider unregistering one at random for each iteration, as in the precedence longevity suite.
-${TESTED_MEMBER_WITHOUT_RPC_IDX} ${3}
+${TESTED_MEMBER_WITHOUT_RPC_IDX} ${3}
# TODO: change back to 24h when releng has more granular steps to kill VMs than days; now 23h=82800s
-${LONGEVITY_TEST_DURATION_IN_SECS} 82800
+${LONGEVITY_TEST_DURATION_IN_SECS} 82800
+
*** Test Cases ***
Rpc_Provider_Precedence_Longevity
[Documentation] Test register rpc on two of three nodes and repeat the tested scenario for 24h.
DrbCommons.Register_Rpc_On_Nodes ${INSTALLED_RPC_MEMEBER_IDX_LIST}
- WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout ${LONGEVITY_TEST_DURATION_IN_SECS} 1s Test_Scenario
+ WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout
+ ... ${LONGEVITY_TEST_DURATION_IN_SECS}
+ ... 1s
+ ... Test_Scenario
DrbCommons.Unregister_Rpc_On_Nodes ${INSTALLED_RPC_MEMEBER_IDX_LIST}
+
*** Keywords ***
Setup_Kw
[Documentation] Setup keyword. Create ${possible_constants} list with possible variables of remote constants.
DrbCommons.Isolate_Node ${isolated_idx}
BuiltIn.Wait_Until_Keyword_Succeeds 60s 5s DrbCommons.Verify_Constant_On_Active_Nodes
DrbCommons.Rejoin_Node ${isolated_idx}
- WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout 20s 1s DrbCommons.Verify_Constant_On_Active_Nodes
+ WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout
+ ... 20s
+ ... 1s
+ ... DrbCommons.Verify_Constant_On_Active_Nodes
*** Settings ***
-Documentation DOMRpcBroker testing: RPC Provider Precedence
+Documentation DOMRpcBroker testing: RPC Provider Precedence
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... The aim is to establish that remote RPC implementations have lower priority
-... than local ones, which is to say that any movement of RPCs on remote nodes
-... does not affect routing as long as a local implementation is available.
-Suite Setup Setup_Keyword
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Library SSHLibrary
-Resource ${CURDIR}/../../../libraries/controller/DrbCommons.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+... The aim is to establish that remote RPC implementations have lower priority
+... than local ones, which is to say that any movement of RPCs on remote nodes
+... does not affect routing as long as a local implementation is available.
+
+Library SSHLibrary
+Resource ${CURDIR}/../../../libraries/controller/DrbCommons.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+
+Suite Setup Setup_Keyword
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags critical
+
*** Variables ***
${UNREGISTERED_RPC_NODE} ${1}
+
*** Test Cases ***
Register_Rpc_On_Each_Node
[Documentation] Register global rpc on each node of the cluster.
[Documentation] Unregister rpc on every node.
DrbCommons.Unregister_Rpc_On_Nodes ${all_indices}
+
*** Keywords ***
Setup_Keyword
[Documentation] Create a list of possible constant responses on the node with unregistered rpc.
*** Settings ***
-Documentation DOMRpcBroker testing: RPC Provider Precedence
+Documentation DOMRpcBroker testing: RPC Provider Precedence
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
...
-... The aim is to establish that remote RPC implementations have lower priority
-... than local ones, which is to say that any movement of RPCs on remote nodes
-... does not affect routing as long as a local implementation is available.
-Suite Setup Setup_Keyword
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Library SSHLibrary
-Resource ${CURDIR}/../../../libraries/controller/DrbCommons.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/WaitForFailure.robot
+... The aim is to establish that remote RPC implementations have lower priority
+... than local ones, which is to say that any movement of RPCs on remote nodes
+... does not affect routing as long as a local implementation is available.
+
+Library SSHLibrary
+Resource ${CURDIR}/../../../libraries/controller/DrbCommons.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource ${CURDIR}/../../../libraries/WaitForFailure.robot
+
+Suite Setup Setup_Keyword
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags critical
+
*** Variables ***
# TODO: change back to 24h when releng has more granular steps to kill VMs than days; now 23h=82800s
-${LONGEVITY_TEST_DURATION_IN_SECS} 82800
+${LONGEVITY_TEST_DURATION_IN_SECS} 82800
+
*** Test Cases ***
Rpc_Provider_Precedence_Longevity
[Documentation] Repeat the tested scenario for 24h.
DrbCommons.Register_Rpc_On_Nodes ${all_indices}
- WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout ${LONGEVITY_TEST_DURATION_IN_SECS} 1s Test_Scenario
+ WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout
+ ... ${LONGEVITY_TEST_DURATION_IN_SECS}
+ ... 1s
+ ... Test_Scenario
DrbCommons.Unregister_Rpc_On_Nodes ${all_indices}
+
*** Keywords ***
Setup_Keyword
[Documentation] Create a list of possible constant responses on the node with unregistered rpc.
*** Settings ***
-Documentation Controller functional HA testing of global singleton rpcs if jvm frozen.
+Documentation Controller functional HA testing of global singleton rpcs if jvm frozen.
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
-Suite Setup Setup_Suite
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing member_index_list=${active_nodes}
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource ${CURDIR}/../../../libraries/KarafKeywords.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Resource ${CURDIR}/../../../libraries/WaitForFailure.robot
-Resource ${CURDIR}/../../../variables/Variables.robot
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
+
+Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource ${CURDIR}/../../../libraries/KarafKeywords.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Resource ${CURDIR}/../../../libraries/WaitForFailure.robot
+Resource ${CURDIR}/../../../variables/Variables.robot
+
+Suite Setup Setup_Suite
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing member_index_list=${active_nodes}
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags critical
+
*** Variables ***
-${RPC_URL} /restconf/operations/basic-rpc-test:basic-global
+${RPC_URL} /restconf/operations/basic-rpc-test:basic-global
&{EMPTY_DICT}
-${SERVICE} Basic-rpc-test']
-${TEST_LOG_LEVEL} info
-@{TEST_LOG_COMPONENTS} org.opendaylight.controller.remote.rpc
-${EOS_URL} /restconf/operational/entity-owners:entity-owners
-${active_nodes} ${EMPTY}
+${SERVICE} Basic-rpc-test']
+${TEST_LOG_LEVEL} info
+@{TEST_LOG_COMPONENTS} org.opendaylight.controller.remote.rpc
+${EOS_URL} /restconf/operational/entity-owners:entity-owners
+${active_nodes} ${EMPTY}
+
*** Test Cases ***
Get_Basic_Rpc_Test_Owner
Run_Rpc ${idx}
END
+
*** Keywords ***
Setup_Suite
[Documentation] FIXME: Add a documentation.
SetupUtils.Setup_Logging_For_Debug_Purposes_On_List_Or_All ${TEST_LOG_LEVEL} ${TEST_LOG_COMPONENTS}
Run_Rpc
- [Arguments] ${node_idx}
[Documentation] Run rpc and log the entity ownership service details to karaf log.
... Logging the details was a developer's request during the implementation to improve debugging.
- ${session} = Resolve_Http_Session_For_Member member_index=${node_idx}
- ${out} = TemplatedRequests.Get_From_Uri ${EOS_URL} session=${session}
+ [Arguments] ${node_idx}
+ ${session}= Resolve_Http_Session_For_Member member_index=${node_idx}
+ ${out}= TemplatedRequests.Get_From_Uri ${EOS_URL} session=${session}
KarafKeywords.Log_Message_To_Controller_Karaf EOS rest resp: ${out} member_index_list=${active_nodes}
TemplatedRequests.Post_To_Uri ${RPC_URL} ${EMPTY} ${HEADERS_XML} ${ACCEPT_XML} session=${session}
Verify_Owner_Elected
- [Arguments] ${new_elected} ${old_owner} ${node_to_ask}
[Documentation] Verify new owner was elected or remained the same.
+ [Arguments] ${new_elected} ${old_owner} ${node_to_ask}
${owner} ${successors}= Get_Present_Brt_Owner_And_Successors ${node_to_ask}
- BuiltIn.Run_Keyword_If ${new_elected} BuiltIn.Should_Not_Be_Equal_As_Numbers ${old_owner} ${owner}
- BuiltIn.Run_Keyword_If not ${new_elected} BuiltIn.Should_Be_Equal_As_numbers ${old_owner} ${owner}
+ IF ${new_elected}
+ BuiltIn.Should_Not_Be_Equal_As_Numbers ${old_owner} ${owner}
+ END
+ IF not ${new_elected}
+ BuiltIn.Should_Be_Equal_As_numbers ${old_owner} ${owner}
+ END
Get_Present_Brt_Owner_And_Successors
- [Arguments] ${node_to_ask} ${store}=${False}
[Documentation] Find a basic rpc test service owner and successors and store them if indicated.
- ${brt_owner} ${brt_successors}= ClusterManagement.Get_Owner_And_Successors_For_Device ${SERVICE} org.opendaylight.mdsal.ServiceEntityType ${node_to_ask}
- BuiltIn.Run_Keyword_If ${store} BuiltIn.Set_Suite_Variable ${brt_owner} ${brt_owner}
- BuiltIn.Run_Keyword_If ${store} BuiltIn.Set_Suite_Variable ${brt_successors} ${brt_successors}
- BuiltIn.Return_From_Keyword ${brt_owner} ${brt_successors}
+ [Arguments] ${node_to_ask} ${store}=${False}
+ ${brt_owner} ${brt_successors}= ClusterManagement.Get_Owner_And_Successors_For_Device
+ ... ${SERVICE}
+ ... org.opendaylight.mdsal.ServiceEntityType
+ ... ${node_to_ask}
+ IF ${store} BuiltIn.Set_Suite_Variable ${brt_owner} ${brt_owner}
+ IF ${store}
+ BuiltIn.Set_Suite_Variable ${brt_successors} ${brt_successors}
+ END
+ RETURN ${brt_owner} ${brt_successors}
*** Settings ***
-Documentation Controller functional HA testing of global singleton rpcs.
+Documentation Controller functional HA testing of global singleton rpcs.
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
-Suite Setup Setup_Suite
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource ${CURDIR}/../../../libraries/KarafKeywords.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/ShardStability.robot
-Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Resource ${CURDIR}/../../../variables/Variables.robot
-Resource ${CURDIR}/../../../libraries/WaitForFailure.robot
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
+
+Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource ${CURDIR}/../../../libraries/KarafKeywords.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource ${CURDIR}/../../../libraries/ShardStability.robot
+Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Resource ${CURDIR}/../../../variables/Variables.robot
+Resource ${CURDIR}/../../../libraries/WaitForFailure.robot
+
+Suite Setup Setup_Suite
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags critical
+
*** Variables ***
-${RPC_URL} /restconf/operations/basic-rpc-test:basic-global
+${RPC_URL} /restconf/operations/basic-rpc-test:basic-global
&{EMPTY_DICT}
-${SERVICE} Basic-rpc-test']
-${TEST_LOG_LEVEL} info
-@{TEST_LOG_COMPONENTS} org.opendaylight.controller.remote.rpc
-${EOS_URL} /restconf/operational/entity-owners:entity-owners
-${RPC_STATUS_ISOLATED} 501
+${SERVICE} Basic-rpc-test']
+${TEST_LOG_LEVEL} info
+@{TEST_LOG_COMPONENTS} org.opendaylight.controller.remote.rpc
+${EOS_URL} /restconf/operational/entity-owners:entity-owners
+${RPC_STATUS_ISOLATED} 501
+
*** Test Cases ***
Get_Basic_Rpc_Test_Owner
Verify_New_Basic_Rpc_Test_Owner_Elected
[Documentation] Verify new owner of the service is elected.
- ${idx}= Collections.Get_From_List ${old_brt_successors} 0
- BuiltIn.Wait_Until_Keyword_Succeeds 70s 10s ShardStability.Shards_Stability_Get_Details ${DEFAULT_SHARD_LIST} member_index_list=${old_brt_successors}
+ ${idx} = Collections.Get_From_List ${old_brt_successors} 0
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 70s
+ ... 10s
+ ... ShardStability.Shards_Stability_Get_Details
+ ... ${DEFAULT_SHARD_LIST}
+ ... member_index_list=${old_brt_successors}
BuiltIn.Wait_Until_Keyword_Succeeds 60s 5s Verify_Owner_Elected ${True} ${old_brt_owner} ${idx}
Get_Present_Brt_Owner_And_Successors ${idx} store=${True}
Rejoin_Isolated_Member
[Documentation] Rejoin isolated node
ClusterManagement.Rejoin_Member_From_List_Or_All ${old_brt_owner}
- BuiltIn.Wait_Until_Keyword_Succeeds 70s 10s ShardStability.Shards_Stability_Get_Details ${DEFAULT_SHARD_LIST}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 70s
+ ... 10s
+ ... ShardStability.Shards_Stability_Get_Details
+ ... ${DEFAULT_SHARD_LIST}
Rpc_After_Rejoin_On_New_Owner
[Documentation] Run rpc on the new service owner node.
Run_Rpc ${idx}
END
+
*** Keywords ***
Setup_Suite
[Documentation] FIXME: Add a documentation.
SetupUtils.Setup_Logging_For_Debug_Purposes_On_List_Or_All ${TEST_LOG_LEVEL} ${TEST_LOG_COMPONENTS}
Run_Rpc
- [Arguments] ${node_idx}
[Documentation] Run rpc and log the entity ownership service details to karaf log.
... Logging the details was a developer's request during the implementation to improve debugging.
+ [Arguments] ${node_idx}
${session} = Resolve_Http_Session_For_Member member_index=${node_idx}
Get_And_Log_EOS_Output_To_Karaf_Log ${session}
TemplatedRequests.Post_To_Uri ${RPC_URL} ${EMPTY} ${HEADERS_XML} ${ACCEPT_XML} session=${session}
Verify_Owner_Elected
- [Arguments] ${new_elected} ${old_owner} ${node_to_ask}
[Documentation] Verify new owner was elected or remained the same.
- ${owner} ${successors}= Get_Present_Brt_Owner_And_Successors ${node_to_ask}
- BuiltIn.Run_Keyword_If ${new_elected} BuiltIn.Should_Not_Be_Equal_As_Numbers ${old_owner} ${owner}
- BuiltIn.Run_Keyword_If not ${new_elected} BuiltIn.Should_Be_Equal_As_numbers ${old_owner} ${owner}
+ [Arguments] ${new_elected} ${old_owner} ${node_to_ask}
+ ${owner} ${successors} = Get_Present_Brt_Owner_And_Successors ${node_to_ask}
+ IF ${new_elected}
+ BuiltIn.Should_Not_Be_Equal_As_Numbers ${old_owner} ${owner}
+ END
+ IF not ${new_elected}
+ BuiltIn.Should_Be_Equal_As_numbers ${old_owner} ${owner}
+ END
Get_Present_Brt_Owner_And_Successors
- [Arguments] ${node_to_ask} ${store}=${False}
[Documentation] Find a basic rpc test service owner and successors and store them if indicated.
- ${brt_owner} ${brt_successors}= ClusterManagement.Get_Owner_And_Successors_For_Device ${SERVICE} org.opendaylight.mdsal.ServiceEntityType ${node_to_ask}
- BuiltIn.Run_Keyword_If ${store} BuiltIn.Set_Suite_Variable ${brt_owner} ${brt_owner}
- BuiltIn.Run_Keyword_If ${store} BuiltIn.Set_Suite_Variable ${brt_successors} ${brt_successors}
- BuiltIn.Return_From_Keyword ${brt_owner} ${brt_successors}
+ [Arguments] ${node_to_ask} ${store}=${False}
+ ${brt_owner} ${brt_successors} = ClusterManagement.Get_Owner_And_Successors_For_Device
+ ... ${SERVICE}
+ ... org.opendaylight.mdsal.ServiceEntityType
+ ... ${node_to_ask}
+ IF ${store} BuiltIn.Set_Suite_Variable ${brt_owner} ${brt_owner}
+ IF ${store}
+ BuiltIn.Set_Suite_Variable ${brt_successors} ${brt_successors}
+ END
+ RETURN ${brt_owner} ${brt_successors}
Get_And_Log_EOS_Output_To_Karaf_Log
- [Arguments] ${session}
[Documentation] Log the entity ownership service details to karaf.log
+ [Arguments] ${session}
${out} = TemplatedRequests.Get_From_Uri ${EOS_URL} session=${session}
KarafKeywords.Log_Message_To_Controller_Karaf EOS rest resp: ${out}
*** Settings ***
-Documentation Controller functional HA testing of global singleton rpcs.
+Documentation Controller functional HA testing of global singleton rpcs.
...
-... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
+... Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
-Suite Setup Setup_Suite
-Suite Teardown SSHLibrary.Close_All_Connections
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Default Tags critical
-Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource ${CURDIR}/../../../libraries/KarafKeywords.robot
-Resource ${CURDIR}/../../../libraries/ShardStability.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Resource ${CURDIR}/../../../libraries/WaitForFailure.robot
-Resource ${CURDIR}/../../../variables/Variables.robot
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
+
+Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
+Resource ${CURDIR}/../../../libraries/KarafKeywords.robot
+Resource ${CURDIR}/../../../libraries/ShardStability.robot
+Resource ${CURDIR}/../../../libraries/SetupUtils.robot
+Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Resource ${CURDIR}/../../../libraries/WaitForFailure.robot
+Resource ${CURDIR}/../../../variables/Variables.robot
+
+Suite Setup Setup_Suite
+Suite Teardown SSHLibrary.Close_All_Connections
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
+
+Default Tags critical
+
*** Variables ***
-${RPC_URL} /restconf/operations/basic-rpc-test:basic-global
+${RPC_URL} /restconf/operations/basic-rpc-test:basic-global
&{EMPTY_DICT}
-${SERVICE} Basic-rpc-test']
-${TEST_LOG_LEVEL} info
-@{TEST_LOG_COMPONENTS} org.opendaylight.controller.remote.rpc
-${EOS_URL} /restconf/operational/entity-owners:entity-owners
+${SERVICE} Basic-rpc-test']
+${TEST_LOG_LEVEL} info
+@{TEST_LOG_COMPONENTS} org.opendaylight.controller.remote.rpc
+${EOS_URL} /restconf/operational/entity-owners:entity-owners
+
*** Test Cases ***
Get_Basic_Rpc_Test_Owner
Verify_New_Owner_Remained_After_Rejoin
[Documentation] Verify no owner change happened after rejoin.
- WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout 15s 2s Verify_Owner_Elected ${False} ${brt_owner} ${brt_owner}
- BuiltIn.Wait_Until_Keyword_Succeeds 70s 10s ShardStability.Shards_Stability_Get_Details ${DEFAULT_SHARD_LIST}
+ WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout
+ ... 15s
+ ... 2s
+ ... Verify_Owner_Elected
+ ... ${False}
+ ... ${brt_owner}
+ ... ${brt_owner}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 70s
+ ... 10s
+ ... ShardStability.Shards_Stability_Get_Details
+ ... ${DEFAULT_SHARD_LIST}
Rpc_After_Rejoin_On_New_Owner
[Documentation] Run rpc on the new service owner node.
Run_Rpc ${idx}
END
+
*** Keywords ***
Setup_Suite
[Documentation] FIXME: Add a documentation.
SetupUtils.Setup_Logging_For_Debug_Purposes_On_List_Or_All ${TEST_LOG_LEVEL} ${TEST_LOG_COMPONENTS}
Run_Rpc
- [Arguments] ${node_idx}
[Documentation] Run rpc and log the entity ownership service details to karaf log.
... Logging the details was a developer's request during the implementation to improve debugging.
- ${session} = Resolve_Http_Session_For_Member member_index=${node_idx}
- ${out} = TemplatedRequests.Get_From_Uri ${EOS_URL} session=${session}
+ [Arguments] ${node_idx}
+ ${session}= Resolve_Http_Session_For_Member member_index=${node_idx}
+ ${out}= TemplatedRequests.Get_From_Uri ${EOS_URL} session=${session}
KarafKeywords.Log_Message_To_Controller_Karaf EOS rest resp: ${out}
TemplatedRequests.Post_To_Uri ${RPC_URL} ${EMPTY} ${HEADERS_XML} ${ACCEPT_XML} session=${session}
Verify_Owner_Elected
- [Arguments] ${new_elected} ${old_owner} ${node_to_ask}
[Documentation] Verify new owner was elected or remained the same.
+ [Arguments] ${new_elected} ${old_owner} ${node_to_ask}
${owner} ${successors}= Get_Present_Brt_Owner_And_Successors ${node_to_ask}
- BuiltIn.Run_Keyword_If ${new_elected} BuiltIn.Should_Not_Be_Equal_As_Numbers ${old_owner} ${owner}
- BuiltIn.Run_Keyword_If not ${new_elected} BuiltIn.Should_Be_Equal_As_numbers ${old_owner} ${owner}
+ IF ${new_elected}
+ BuiltIn.Should_Not_Be_Equal_As_Numbers ${old_owner} ${owner}
+ END
+ IF not ${new_elected}
+ BuiltIn.Should_Be_Equal_As_numbers ${old_owner} ${owner}
+ END
Get_Present_Brt_Owner_And_Successors
- [Arguments] ${node_to_ask} ${store}=${False}
[Documentation] Find a basic rpc test service owner and successors and store them if indicated.
- ${brt_owner} ${brt_successors}= ClusterManagement.Get_Owner_And_Successors_For_Device ${SERVICE} org.opendaylight.mdsal.ServiceEntityType ${node_to_ask}
- BuiltIn.Run_Keyword_If ${store} BuiltIn.Set_Suite_Variable ${brt_owner} ${brt_owner}
- BuiltIn.Run_Keyword_If ${store} BuiltIn.Set_Suite_Variable ${brt_successors} ${brt_successors}
- BuiltIn.Return_From_Keyword ${brt_owner} ${brt_successors}
+ [Arguments] ${node_to_ask} ${store}=${False}
+ ${brt_owner} ${brt_successors}= ClusterManagement.Get_Owner_And_Successors_For_Device
+ ... ${SERVICE}
+ ... org.opendaylight.mdsal.ServiceEntityType
+ ... ${node_to_ask}
+ IF ${store} BuiltIn.Set_Suite_Variable ${brt_owner} ${brt_owner}
+ IF ${store}
+ BuiltIn.Set_Suite_Variable ${brt_successors} ${brt_successors}
+ END
+ RETURN ${brt_owner} ${brt_successors}