Refer to AlmTestSetsRunner.cs file located here: https://github.com/jenkinsci/hp-application-automation-tools-plugin/blob/master/HpToolsLauncher/Runners/AlmTestSetsRunner.cs
The issue is in the RunTestSet function.
1. The While loop (line 548) that iterates through all test instances, does a comparison between the elapsed "minutes" and compares it to the timeout value, which we set to a specific number of "seconds".
a. Code: while ((tsExecutionFinished == false) && (timeout == -1 || sw.Elapsed.TotalMinutes < timeout))
b. So, if you currently have the timeout set to 14400, it won’t timeout for 14400 minutes, rather than 4 hours.
2. The obvious workaround would be to just set the timeout value to 240 to achieve the 4-hour timeout. However, there is an IF condition (line 645)that is checked before consolidating results and generating the XML reports. It compares the elapsed time in "seconds" to the timeout value.
a. Code: if (timeout == -1 || sw.Elapsed.TotalSeconds < timeout)
b. So, if you set the timeout to 240, and the test set runs longer than 240 seconds (4 minutes), the XML reports won’t be generated, and the run will be cancelled/aborted.
So, basically, timeouts will not be functional in the current version of the hp-application-automation-tools-plugin until this code is fixed. I'm open to the timeout being either minutes or seconds. I just need consistency between these two comparisons.
Funny, but if you look at the comments in the code on line 371, it reads "/// <param name="timeout">-1 for unlimited, or number of miliseconds</param>". So, whoever wrote that code thought the timeout should be in milliseconds.