X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=csit%2Flibraries%2FRestPerfClient.robot;h=5be9901fea79ff877f7df7c91efb1208828d454e;hb=d539c094594001969bf83709f6defa23652e6350;hp=1a1b6f13bfc7fb82f21453cde4757c126bc5eeb1;hpb=50bc19271f3a176089f03aabd24ea87246f0d1f4;p=integration%2Ftest.git diff --git a/csit/libraries/RestPerfClient.robot b/csit/libraries/RestPerfClient.robot index 1a1b6f13bf..5be9901fea 100644 --- a/csit/libraries/RestPerfClient.robot +++ b/csit/libraries/RestPerfClient.robot @@ -1,16 +1,19 @@ *** Settings *** Documentation RestPerfClient handling singleton resource. ... -... Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. +... Copyright (c) 2016,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 singleton manages RestPerfClient invocation, tracks the log file ... produced by the invocation, allows the test suite to easily search this ... log file and collect it once done. ... +... TODO: RemoteBash.robot contains logic which could be reused here. +... ... TODO: Currently only one RestPerfClient invocation running at a time is ... supported. Support for multiple concurrently running RestPerfClient ... invocations might be needed for example when performance testing cluster @@ -29,12 +32,14 @@ Resource ${CURDIR}/NexusKeywords.robot Resource ${CURDIR}/SetupUtils.robot Resource ${CURDIR}/SSHKeywords.robot Resource ${CURDIR}/Utils.robot +Resource ${CURDIR}/RemoteBash.robot *** Variables *** ${RestPerfClient__restperfclientlog} ${EMPTY} *** Keywords *** Setup_Restperfclient + [Arguments] ${build_version}=${EMPTY} ${build_location}=${EMPTY} [Documentation] Deploy RestPerfClient and determine the Java command to use to call it. ... Open a SSH connection through which the RestPerfClient will be ... invoked, deploy RestPerfClient and the data files it needs to do @@ -43,12 +48,13 @@ Setup_Restperfclient ${connection}= SSHKeywords.Open_Connection_To_Tools_System BuiltIn.Set_Suite_Variable ${RestPerfClient__restperfclient} ${connection} SSHLibrary.Put_File ${CURDIR}/../variables/netconf/RestPerfClient/request1.json - ${filename}= NexusKeywords.Deploy_Test_Tool netconf netconf-testtool rest-perf-client - ${prefix}= NexusKeywords.Compose_Full_Java_Command -Xmx1G -XX:MaxPermSize=256M -jar ${filename} + ${filename}= Run Keyword If '${IS_KARAF_APPL}' == 'False' Set Variable ${RESTPERF_FILENAME} + ... ELSE NexusKeywords.Deploy_Test_Tool netconf netconf-testtool rest-perf-client + ${prefix}= NexusKeywords.Compose_Full_Java_Command -Xmx4G -jar ${filename} BuiltIn.Set_Suite_Variable ${RestPerfClient__restperfclient_invocation_command_prefix} ${prefix} RestPerfClient__Kill - Utils.Write_Bare_Ctrl_C + RemoteBash.Write_Bare_Ctrl_C SSHLibrary.Set_Client_Configuration timeout=5 SSHLibrary.Read_Until_Prompt