Issue Details (XML | Word | Printable)

Key: RIO-205
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dennis Reedy
Reporter: Dennis Reedy
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Rio

Test infrastructure should provide declarative timeout

Created: 10/Sep/09 04:40 PM   Updated: 10/Sep/09 04:52 PM
Component/s: Test
Affects Version/s: 4.0 M3
Fix Version/s: 4.0 M3

Time Tracking:
Not Specified


 Description  « Hide
We need to provide a way to declaratively specify a default timeout for test case methods. This is similar to JUnit's @Test(timeout=xxx) approach, but done outside of the code

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Dennis Reedy added a comment - 10/Sep/09 04:52 PM
If timeout is declared in a test configuration it will be used in the same way that JUnit's timeout is. This value becomes the default timeout (per test method) to use for test case execution.

If JUnit's @Test(timeout="xxx") is used, JUnit's declaration takes precedence.

An example:

SimpleDeployTest { groups = "SimpleDeployTest" numCybernodes = 1 numMonitors = 1 numLookups = 1 opstring = 'src/test/resources/simple_opstring.groovy' harvest = true timeout = 10000 }

The SimpleDeployTest will have a default timeout of 10 seconds per test case method.

The timeout is accomplished by using JUnit's FailOnTimeout class