Class Retry

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

    @Deprecated
    public class Retry
    extends java.lang.Object
    implements org.junit.rules.TestRule
    Deprecated.
    This rule gives you the possibility to retry a test if the exception matches a given Matcher. It is possible to change the maximum of retries, default configuration is 3.
    • Constructor Summary

      Constructors 
      Constructor Description
      Retry​(org.hamcrest.Matcher<? extends java.lang.Throwable> matcher)
      Deprecated.
      Retries the test if the given matcher matches the exception thrown.
      Retry​(org.hamcrest.Matcher<? extends java.lang.Throwable> matcher, int maximalTrials)
      Deprecated.
      Retries the test if the given matcher matches the exception thrown.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      org.junit.runners.model.Statement apply​(org.junit.runners.model.Statement base, org.junit.runner.Description description)
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Retry

        public Retry​(org.hamcrest.Matcher<? extends java.lang.Throwable> matcher)
        Deprecated.
        Retries the test if the given matcher matches the exception thrown. Maximum number of retries is 3
        Parameters:
        matcher - if the matcher matches the exception the test will be retried
      • Retry

        public Retry​(org.hamcrest.Matcher<? extends java.lang.Throwable> matcher,
                     int maximalTrials)
        Deprecated.
        Retries the test if the given matcher matches the exception thrown. Maximum number of retries is 3
        Parameters:
        matcher - if the matcher matches the exception the test will be retried
        maximalTrials - no of maximal trials
    • Method Detail

      • apply

        public org.junit.runners.model.Statement apply​(org.junit.runners.model.Statement base,
                                                       org.junit.runner.Description description)
        Deprecated.
        Specified by:
        apply in interface org.junit.rules.TestRule