Package org.elasticsearch.test
Class RetryRule
java.lang.Object
org.elasticsearch.test.RetryRule
- All Implemented Interfaces:
org.junit.rules.TestRule
Provides a way to retry a failed test. To use this functionality add something like the following to your test class:
@Rule
@Rule
public RetryRule retry = new RetryRule(3, TimeValue.timeValueSeconds(1));
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.junit.runners.model.Statementapply(org.junit.runners.model.Statement statement, org.junit.runner.Description description)
-
Constructor Details
-
RetryRule
public RetryRule(int maxAttempts, org.elasticsearch.core.TimeValue retryDelay)
-
-
Method Details
-
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement statement, org.junit.runner.Description description) - Specified by:
applyin interfaceorg.junit.rules.TestRule
-