Last active
December 3, 2017 17:43
-
-
Save Romeh/c20e0011efeb8a60c880a9967b81b545 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.test.SpringBootSample.retry; | |
/** | |
* Created by id961900 on 05/09/2017. | |
*/ | |
import java.lang.annotation.ElementType; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
import java.lang.annotation.Target; | |
/** | |
* Retries a unit-test according to the attributes set here | |
* <p> | |
* The class containing the test(s) decorated with this annotation must have a public field of type {@link RetryRule} | |
*/ | |
@Retention(RetentionPolicy.RUNTIME) | |
@Target({ElementType.METHOD, ElementType.TYPE}) | |
public @interface Retry { | |
/** | |
* @return the number of times to try this method before the failure is propagated through | |
*/ | |
int times() default 3; | |
/** | |
* @return how long to sleep between invocations of the unit tests, in milliseconds | |
*/ | |
long timeout() default 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment