Added Karaf console connection timeout configurability 79/30379/3
authorJozef Behran <jbehran@cisco.com>
Mon, 30 Nov 2015 11:59:02 +0000 (12:59 +0100)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 30 Nov 2015 17:38:55 +0000 (17:38 +0000)
The default is 10 seconds which may be too short for some
suites, for example the scaling suite needs a massive timeout
due to the memory leak bugs that cause massive garbage
collection pauses especially when multiple scaling test
suites are invoked in a row. This change adds a keyword
which allows these affected suites to specify a different
timeout that better suits them.

Change-Id: I4532f4d108999aa34a2a8dce3221b4c24e4e08cf
Signed-off-by: Jozef Behran <jbehran@cisco.com>
csit/libraries/KarafKeywords.robot

index 87f2f05818fda412a6481cd3f3d9caf573c1217d..9b58d5d32f769fc3ef8eca847f87ba89428c2ab8 100644 (file)
@@ -116,6 +116,14 @@ Open Controller Karaf Console On Background
     BuiltIn.Set Suite Variable    ${KarafKeywords__karaf_connection_index}    ${karaf_connection.index}
     Restore Current SSH Connection From Index    ${current_ssh_connection.index}
 
+Configure Timeout For Karaf Console
+    [Arguments]    ${timeout}
+    [Documentation]    Configure a different timeout for the Karaf console
+    BuiltIn.Run Keyword If    ${KarafKeywords__karaf_connection_index} == -1    Fail    Need to connect to a Karaf Console first
+    ${current_connection_index}=    SSHLibrary.Switch Connection    ${KarafKeywords__karaf_connection_index}
+    SSHLibrary.Set_Client_Configuration    timeout=${timeout}
+    Restore Current SSH Connection From Index    ${current_connection_index}
+
 Execute Controller Karaf Command On Background
     [Arguments]    ${command}
     [Documentation]    Send command to karaf without affecting current SSH connection. Read, log and return response.