From da3d03368e1ce858201f5c018a594c53919d8665 Mon Sep 17 00:00:00 2001 From: Peter Gubka Date: Fri, 13 Jan 2017 14:36:47 +0100 Subject: [PATCH] Add karaf logging to controller-clustering.txt suites Change-Id: I764b451dca4a49feac62ec3e290be47ace81b625 Signed-off-by: Peter Gubka --- csit/libraries/KarafKeywords.robot | 4 ++-- .../controller/Clustering_Datastore/buycar_failover.robot | 4 +++- .../controller/Clustering_Datastore/car_failover_crud.robot | 4 +++- .../controller/Clustering_Datastore/car_outage_corners.robot | 4 +++- .../Clustering_Datastore/car_persistence_recovery.robot | 4 +++- .../controller/Clustering_Datastore/carpeople_crud.robot | 4 +++- .../controller/Clustering_Datastore/cluster_ready.robot | 4 +++- .../controller/Clustering_Datastore/entity_isolate.robot | 4 +++- 8 files changed, 23 insertions(+), 9 deletions(-) diff --git a/csit/libraries/KarafKeywords.robot b/csit/libraries/KarafKeywords.robot index 2c8adde108..f83bed1b33 100644 --- a/csit/libraries/KarafKeywords.robot +++ b/csit/libraries/KarafKeywords.robot @@ -166,8 +166,8 @@ Log Message To Controller Karaf ... By default, failure while processing a node is silently ignored, unless ${tolerate_failure} is False. ${index_list} = ClusterManagement.ClusterManagement__Given_Or_Internal_Index_List given_list=${member_index_list} : FOR ${index} IN @{index_list} # usually: 1, 2, 3. - \ ${status} ${message}= BuiltIn.Run Keyword And Ignore Error Execute Controller Karaf Command With Retry On Background log:log "ROBOT MESSAGE: ${message}" member_index=${index} - \ BuiltIn.Run_Keyword_Unless ${tolerate_failure} or "${status}" == "PASS" BuiltIn.Fail ${message} + \ ${status} ${output}= BuiltIn.Run Keyword And Ignore Error Execute Controller Karaf Command With Retry On Background log:log "ROBOT MESSAGE: ${message}" member_index=${index} + \ BuiltIn.Run_Keyword_Unless ${tolerate_failure} or "${status}" == "PASS" BuiltIn.Fail ${output} Log Test Suite Start To Controller Karaf [Arguments] ${member_index_list}=${EMPTY} diff --git a/csit/suites/controller/Clustering_Datastore/buycar_failover.robot b/csit/suites/controller/Clustering_Datastore/buycar_failover.robot index 444e4e2908..40751ddcdf 100644 --- a/csit/suites/controller/Clustering_Datastore/buycar_failover.robot +++ b/csit/suites/controller/Clustering_Datastore/buycar_failover.robot @@ -13,10 +13,12 @@ Documentation This test focuses on testing buy-car RPC over 3 Leader reboots ... 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 @@ -94,7 +96,7 @@ Delete_All_Cars *** Keywords *** Setup [Documentation] Initialize resources, memorize shard leaders, compute item distribution. - ClusterManagement.ClusterManagement_Setup + SetupUtils.Setup_Utils_For_Setup_And_Teardown Set_Variables_For_Shard shard_name=car Set_Variables_For_Shard shard_name=people Set_Variables_For_Shard shard_name=car-people diff --git a/csit/suites/controller/Clustering_Datastore/car_failover_crud.robot b/csit/suites/controller/Clustering_Datastore/car_failover_crud.robot index 1e5cfd6db7..4ada866f02 100644 --- a/csit/suites/controller/Clustering_Datastore/car_failover_crud.robot +++ b/csit/suites/controller/Clustering_Datastore/car_failover_crud.robot @@ -17,10 +17,12 @@ Documentation Suite mixing basic operations with restart of car Leader. ... 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 @@ -107,7 +109,7 @@ Delete_Follower_Cars_On_New_Leader *** Keywords *** Setup [Documentation] Initialize resources, memorize car shard leader and followers. - ClusterManagement.ClusterManagement_Setup + SetupUtils.Setup_Utils_For_Setup_And_Teardown CarPeople.Set_Variables_For_Shard shard_name=car Set_Variables_For_Less_Nodes diff --git a/csit/suites/controller/Clustering_Datastore/car_outage_corners.robot b/csit/suites/controller/Clustering_Datastore/car_outage_corners.robot index 8e10a1bc6f..507a2c2a26 100644 --- a/csit/suites/controller/Clustering_Datastore/car_outage_corners.robot +++ b/csit/suites/controller/Clustering_Datastore/car_outage_corners.robot @@ -21,10 +21,12 @@ Documentation Cluster suite for testing minimal and sum-minimal member popul ... 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 @@ -85,7 +87,7 @@ Delete_Cars_On_Leader *** Keywords *** Setup [Documentation] Initialize resources, memorize shard leaders, pre-compute member lists. - ClusterManagement.ClusterManagement_Setup + SetupUtils.Setup_Utils_For_Setup_And_Teardown CarPeople.Set_Variables_For_Shard shard_name=car Set_Additional_Variables diff --git a/csit/suites/controller/Clustering_Datastore/car_persistence_recovery.robot b/csit/suites/controller/Clustering_Datastore/car_persistence_recovery.robot index 3b2020d0aa..9ea49c0b07 100644 --- a/csit/suites/controller/Clustering_Datastore/car_persistence_recovery.robot +++ b/csit/suites/controller/Clustering_Datastore/car_persistence_recovery.robot @@ -13,10 +13,12 @@ Documentation This test restarts all controllers to verify recovery of car d ... 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 @@ -60,5 +62,5 @@ Delete_Cars_On_Leader *** Keywords *** Setup [Documentation] Initialize resources, memorize car shard leader and followers. - ClusterManagement.ClusterManagement_Setup + SetupUtils.Setup_Utils_For_Setup_And_Teardown CarPeople.Set_Variables_For_Shard shard_name=car diff --git a/csit/suites/controller/Clustering_Datastore/carpeople_crud.robot b/csit/suites/controller/Clustering_Datastore/carpeople_crud.robot index 2f53ebe71d..d91d001f09 100644 --- a/csit/suites/controller/Clustering_Datastore/carpeople_crud.robot +++ b/csit/suites/controller/Clustering_Datastore/carpeople_crud.robot @@ -18,10 +18,12 @@ Documentation Suite for performing basic car/people CRUD operations on leade ... 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 @@ -93,7 +95,7 @@ Delete_All_Cars_On_Leader *** Keywords *** Setup [Documentation] Initialize resources, memorize shard leaders, compute item distribution. - ClusterManagement.ClusterManagement_Setup + SetupUtils.Setup_Utils_For_Setup_And_Teardown CarPeople.Set_Variables_For_Shard shard_name=car CarPeople.Set_Variables_For_Shard shard_name=people CarPeople.Set_Variables_For_Shard shard_name=car-people diff --git a/csit/suites/controller/Clustering_Datastore/cluster_ready.robot b/csit/suites/controller/Clustering_Datastore/cluster_ready.robot index 33ad3cbc80..8ba25f69d9 100644 --- a/csit/suites/controller/Clustering_Datastore/cluster_ready.robot +++ b/csit/suites/controller/Clustering_Datastore/cluster_ready.robot @@ -11,9 +11,11 @@ Documentation This test waits until cluster appears to be ready. ... 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 ClusterManagement.ClusterManagement_Setup +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 *** Variables *** ${CLUSTER_BOOTUP_SYNC_TIMEOUT} 180s diff --git a/csit/suites/controller/Clustering_Datastore/entity_isolate.robot b/csit/suites/controller/Clustering_Datastore/entity_isolate.robot index 290daae84c..c76c025a9c 100644 --- a/csit/suites/controller/Clustering_Datastore/entity_isolate.robot +++ b/csit/suites/controller/Clustering_Datastore/entity_isolate.robot @@ -2,10 +2,12 @@ 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 @@ -41,7 +43,7 @@ Check All Shards After Rejoin *** Keywords *** Setup [Documentation] Initialize resources, memorize car shard leader and followers. - ClusterManagement.ClusterManagement_Setup + SetupUtils.Setup_Utils_For_Setup_And_Teardown CarPeople.Set_Variables_For_Shard shard_name=entity-ownership shard_type=operational Teardown -- 2.36.6