注释类型 Timed
@Target({METHOD,ANNOTATION_TYPE}) @Retention(RUNTIME) @Documented public @interface Timed
Test-specific annotation to indicate that a test method has to finish execution in a specified time period.If the text 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.
As of Spring Framework 4.0, this annotation may be used as a meta-annotation to create custom composed annotations.
- 从以下版本开始:
- 2.0
- 作者:
- Rod Johnson, Sam Brannen
- 另请参阅:
Repeat
,SpringJUnit4ClassRunner
,SpringMethodRule
,SpringFailOnTimeout
必需元素概要
所需元素 修饰符和类型 必需的元素 说明 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.
元素详细资料
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.