Package org.apache.sling.commons.testing.junit

# Class RetryRule

java.lang.Object
org.apache.sling.commons.testing.junit.RetryRule

All Implemented Interfaces:
  `org.junit.rules.TestRule`

public class RetryRule extends Object implements org.junit.rules.TestRule
JUnit Rule that implements retries, see tests for usage example

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`DEFAULT_DEFAULT_INTERVAL_MSEC`
`static final int`
`DEFAULT_DEFAULT_TIMEOUT_MSEC`

## Constructor Summary

Constructors
Constructor
Description
`RetryRule()`
Create a RetryRule with default values for default timeout and interval
`RetryRule(long defaultTimeout, long defaultInterval)`
Create a RetryRule with specific values for default timeout and interval

## Method Summary

Modifier and Type
Method
Description
`org.junit.runners.model.Statement`
`apply(org.junit.runners.model.Statement statement, org.junit.runner.Description description)`
`String`
`toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### DEFAULT_DEFAULT_TIMEOUT_MSEC

public static final int DEFAULT_DEFAULT_TIMEOUT_MSEC

See Also:
  - Constant Field Values

### DEFAULT_DEFAULT_INTERVAL_MSEC

public static final int DEFAULT_DEFAULT_INTERVAL_MSEC

See Also:
  - Constant Field Values

## Constructor Details

### RetryRule

public RetryRule()
Create a RetryRule with default values for default timeout and interval

### RetryRule

public RetryRule(long defaultTimeout, long defaultInterval)
Create a RetryRule with specific values for default timeout and interval

## Method Details

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### apply

public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement statement, org.junit.runner.Description description)

Specified by:
  `apply` in interface `org.junit.rules.TestRule`