From dede31eeed505c17dafd670e6b9ee289de5fc396 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Fri, 24 Jul 2015 16:51:01 +0200 Subject: [PATCH] Polish Javadoc in @Timed & @Repeat --- .../org/springframework/test/annotation/Repeat.java | 10 ++++++++-- .../org/springframework/test/annotation/Timed.java | 13 ++++++++----- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/spring-test/src/main/java/org/springframework/test/annotation/Repeat.java b/spring-test/src/main/java/org/springframework/test/annotation/Repeat.java index 35b72d5667b..1b04d64fd3a 100644 --- a/spring-test/src/main/java/org/springframework/test/annotation/Repeat.java +++ b/spring-test/src/main/java/org/springframework/test/annotation/Repeat.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,13 +36,19 @@ import static java.lang.annotation.RetentionPolicy.*; * @author Rod Johnson * @author Sam Brannen * @since 2.0 - * @see Timed + * @see org.springframework.test.annotation.Timed + * @see org.springframework.test.context.junit4.SpringJUnit4ClassRunner + * @see org.springframework.test.context.junit4.rules.SpringMethodRule + * @see org.springframework.test.context.junit4.statements.SpringRepeat */ @Documented @Retention(RUNTIME) @Target({ METHOD, ANNOTATION_TYPE }) public @interface Repeat { + /** + * The number of times that the annotated test method should be repeated. + */ int value() default 1; } diff --git a/spring-test/src/main/java/org/springframework/test/annotation/Timed.java b/spring-test/src/main/java/org/springframework/test/annotation/Timed.java index 9f3a324f6a4..f364dab237a 100644 --- a/spring-test/src/main/java/org/springframework/test/annotation/Timed.java +++ b/spring-test/src/main/java/org/springframework/test/annotation/Timed.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,13 +25,13 @@ import static java.lang.annotation.RetentionPolicy.*; /** * Test-specific annotation to indicate that a test method has to finish - * execution in a {@link #millis() specified time period}. + * execution in a {@linkplain #millis() specified time period}. * *

If the text execution takes longer than the specified time period, then - * the test is to be considered failed. + * the test is considered to have failed. * *

Note that the time period includes execution of the test method itself, - * any {@link Repeat repetitions} of the test, and any set up or + * any {@linkplain Repeat 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 @@ -40,7 +40,10 @@ import static java.lang.annotation.RetentionPolicy.*; * @author Rod Johnson * @author Sam Brannen * @since 2.0 - * @see Repeat + * @see org.springframework.test.annotation.Repeat + * @see org.springframework.test.context.junit4.SpringJUnit4ClassRunner + * @see org.springframework.test.context.junit4.rules.SpringMethodRule + * @see org.springframework.test.context.junit4.statements.SpringFailOnTimeout */ @Documented @Retention(RUNTIME)