Bug 7868: Increase timeout for one request in car perf 66/52366/5
authorVratko Polak <vrpolak@cisco.com>
Tue, 28 Feb 2017 14:42:01 +0000 (15:42 +0100)
committerLuis Gomez <ecelgp@gmail.com>
Tue, 28 Feb 2017 20:30:28 +0000 (20:30 +0000)
There has been a performance regression,
but in order to see how bad it is, we need to wait longer.

Also:
+ Added a check to fail Add_Card when tool reports an error.
+ Test teardown to report known bugs.

Change-Id: Iec3334d4986c367926fabae12cfc389953747212
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
csit/suites/controller/OneNode_Datastore/010_crud_mdsal_perf.robot
tools/odl-mdsal-clustering-tests/scripts/cluster_rest_script.py

index c744253c0c9039f8971ff60712110710883f588a..314546fa02ccd6b7db70867880eeeb39b09e803d 100644 (file)
@@ -1,7 +1,7 @@
 *** Settings ***
 Documentation     Test for measuring execution time of MD-SAL DataStore operations.
 ...
-...               Copyright (c) 2015 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,
@@ -12,11 +12,11 @@ Documentation     Test for measuring execution time of MD-SAL DataStore operatio
 ...               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
+...               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
@@ -27,7 +27,7 @@ Resource          ../../../libraries/SetupUtils.robot
 *** Variables ***
 ${ITEM_COUNT}     ${10000}
 ${ITEM_BATCH}     ${10000}
-${PROCEDURE_TIMEOUT}    5m
+${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
@@ -41,7 +41,9 @@ ${TOOL_OPTIONS}    ${EMPTY}
 Add Cars
     [Documentation]    Request to add ${ITEM_COUNT} cars (timeout in ${PROCEDURE_TIMEOUT}).
     Start Tool    ${addcarcmd}    ${TOOL_OPTIONS}
-    Wait Until Tool Finish    ${PROCEDURE_TIMEOUT}
+    ${output}=    Wait Until Tool Finish    ${PROCEDURE_TIMEOUT}
+    BuiltIn.Log    ${output}
+    BuiltIn.Should Not Contain    ${output}    ERROR
 
 Verify Cars
     [Documentation]    Store logs and verify result
@@ -123,8 +125,8 @@ Start_Tool
 
 Wait_Until_Tool_Finish
     [Arguments]    ${timeout}
-    [Documentation]    Wait ${timeout} for the tool exit.
-    BuiltIn.Wait Until Keyword Succeeds    ${timeout}    1s    SSHLibrary.Read Until Prompt
+    [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
 
 Purchase Is Completed
     [Arguments]    ${item_count}
index 818a729a45cb119dac070362c737e97b64769a6c..beefeed70dd6cc63349950186718a1484e2e8252 100644 (file)
@@ -208,7 +208,7 @@ def _request_sender(thread_id, preparing_function, auth, in_queue=None,
         req = preparing_function(odl_ip, port, item_list, auth)
         prep = req.prepare()
         try:
-            rsp = ses.send(prep, timeout=60)
+            rsp = ses.send(prep, timeout=600)
         except requests.exceptions.Timeout:
             counter[99] += 1
             logger.error("No response from %s", odl_ip)