Update Robot Framework format - step 5
[integration/test.git] / csit / suites / controller / cluster_singleton / chasing_the_leader.robot
index 092da08aa59eb29783cb733e30d26b246b34d83f..394f557b2d50b188934ee30c1673a03540fb12d8 100644 (file)
@@ -1,28 +1,38 @@
 *** 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
-${ACCEPTED_PER_SEC_RATE}    100
-${ACCEPTED_PER_SEC_RATE_CARBON}    5
+${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
+# 50, but in order to stabilize our tests and avoid false failures this rate has been set
+# low. The test will still fail if there are failed registrations during the "flapping".
+# Some discussion of this can be found in the comments of
+# https://git.opendaylight.org/gerrit/#/c/74692/.
+
 
 *** Test Cases ***
 Register_Candidates
@@ -37,10 +47,13 @@ Do_Nothing
 
 Unregister_Candidates_And_Validate_Criteria
     [Documentation]    Unregister the testing service and check recevied statistics.
-    ${rate_limit_to_pass} =    CompareStream.Set_Variable_If_At_Most_Carbon    ${ACCEPTED_PER_SEC_RATE_CARBON}    ${ACCEPTED_PER_SEC_RATE}
-    CsCommon.Unregister_Flapping_Singleton_On_Nodes_And_Validate_Results    ${cs_all_indices}    ${rate_limit_to_pass}    ${TEST_DURATION}
+    CsCommon.Unregister_Flapping_Singleton_On_Nodes_And_Validate_Results
+    ...    ${cs_all_indices}
+    ...    ${ACCEPTED_PER_SEC_RATE}
+    ...    ${TEST_DURATION}
+
 
 *** Keywords ***
 Setup_Keyword
-    SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=30
+    SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
     CsCommon.Cluster_Singleton_Init