Package org.springframework.test.annotation

# Annotation Interface Timed

@Target({METHOD,ANNOTATION_TYPE}) @Retention(RUNTIME) @Documented public @interface Timed
Test annotation for use with JUnit 4 to indicate that a test method has to finish execution in a specified time period.

If the test execution takes longer than the specified time period, then the test is considered to have failed.

Note that the time period includes execution of the test method itself, any repetitions of the test, and any set up or tear down of the test fixture.

This annotation may be used as a meta-annotation to create custom composed annotations.

Since:
  2.0
Author:
  Rod Johnson, Sam Brannen
See Also:
  - `Repeat`
  - `SpringJUnit4ClassRunner`
  - `SpringMethodRule`
  - `SpringFailOnTimeout`

## Required Element Summary

Required Elements
Modifier and Type
Required Element
Description
`long`
`millis`
The maximum amount of time (in milliseconds) that a test execution can take without being marked as failed due to taking too long.

## Element Details

### millis

long millis
The maximum amount of time (in milliseconds) that a test execution can take without being marked as failed due to taking too long.