Issue Type: Bug Bug
Affects Versions: current
Assignee: Ofir Shaked
Components: hp-application-automation-tools-plugin
Created: 27/Feb/14 8:55 PM
Description:

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.

Thanks,
Keith

Project: Jenkins
Labels: plugin jenkins git
Priority: Major Major
Reporter: Keith Jacobs
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to