${options}= BuiltIn.Set_Variable --ip ${ip} --port ${port} --edits ${count}
${options}= BuiltIn.Set_Variable ${options} --edit-content request1.json --async-requests ${async}
${options}= BuiltIn.Set_Variable ${options} --auth ${user} ${password}
- ${options}= BuiltIn.Set_Variable ${options} --destination ${url}
+ ${timeout_in_minutes}= Utils.Convert_To_Minutes ${timeout}
+ ${options}= BuiltIn.Set_Variable ${options} --timeout ${timeout_in_minutes} --destination ${url}
${command}= BuiltIn.Set_Variable ${RestPerfClient__restperfclient_invocation_command_prefix} ${options}
BuiltIn.Log Running restperfclient: ${command}
SSHLibrary.Switch_Connection ${RestPerfClient__restperfclient}
# "pybot -v".
${value}= BuiltIn.Get_Variable_Value \${${name}} ${value}
BuiltIn.Set_Suite_Variable \${${name}} ${value}
+
+Convert_To_Minutes
+ [Arguments] ${time}
+ [Documentation] Convert a Robot time string to an integer expressing the time in minutes, rounded up
+ ... This is a wrapper around DateTime.Convert_Time which does not
+ ... provide this functionality directly nor is even able to produce
+ ... an integer directly. It is needed for RestPerfClient which
+ ... cannot accept floats for its --timeout parameter and interprets
+ ... the value supplied in this parameter in minutes.
+ ${seconds}= DateTime.Convert_Time ${time} result_format=number
+ ${minutes}= BuiltIn.Evaluate int(math.ceil(${seconds}/60.0)) modules=math
+ [Return] ${minutes}
# Calculate timeouts
${value}= BuiltIn.Evaluate ${REQUEST_COUNT}/50+10
Utils.Set_User_Configurable_Variable_Default DIRECT_MDSAL_TIMEOUT ${value} s
- ${value}= DateTime.Add_Time_To_Time ${DIRECT_MDSAL_TIMEOUT} 60s result_format=compact
+ ${value}= DateTime.Add_Time_To_Time ${DIRECT_MDSAL_TIMEOUT} 2m result_format=compact
Utils.Set_User_Configurable_Variable_Default DIRECT_MDSAL_TIMEOUT_FOR_TESTCASE ${value}
${value}= BuiltIn.Evaluate ${REQUEST_COUNT}/10+10
Utils.Set_User_Configurable_Variable_Default NETCONF_CONNECTOR_MDSAL_TIMEOUT ${value} s
- ${value}= DateTime.Add_Time_To_Time ${NETCONF_CONNECTOR_MDSAL_TIMEOUT} 60s result_format=compact
+ ${value}= DateTime.Add_Time_To_Time ${NETCONF_CONNECTOR_MDSAL_TIMEOUT} 2m result_format=compact
Utils.Set_User_Configurable_Variable_Default NETCONF_CONNECTOR_MDSAL_TIMEOUT_FOR_TESTCASE ${value}
Teardown_Everything
# Calculate and set the value of the timeout
${value}= BuiltIn.Evaluate ${REQUEST_COUNT}/50+10
Utils.Set_User_Configurable_Variable_Default TESTTOOL_DEVICE_TIMEOUT ${value} s
- ${value}= DateTime.Add_Time_To_Time ${TESTTOOL_DEVICE_TIMEOUT} 60s result_format=compact
+ ${value}= DateTime.Add_Time_To_Time ${TESTTOOL_DEVICE_TIMEOUT} 2m result_format=compact
Utils.Set_User_Configurable_Variable_Default TESTTOOL_DEVICE_TIMEOUT_FOR_TESTCASE ${value}
# Setup resources used by the suite.
SetupUtils.Setup_Utils_For_Setup_And_Teardown