org.scalatest

Retries

object Retries extends Retries

Companion object to trait Retries that enables its members to be imported as an alternative to mixing them in.

Linear Supertypes
Retries, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Retries
  2. Retries
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  11. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  14. def isRetryable(testData: TestData): Boolean

    Indicates whether the test described by the given TestData includes the tag org.scalatest.tags.Retryable.

    Indicates whether the test described by the given TestData includes the tag org.scalatest.tags.Retryable.

    This method provides an easy way to selectively retry just tests that are flickering. You can annotated such problematic tests with Retryable, and just retry those. Here's what it might look like:

    override def withFixture(test: NoArgTest) = {
      if (isRetryable(test))
        withRetry { super.withFixture(test) }
      else
        super.withFixture(test)
    }
    

    Definition Classes
    Retries
  15. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  18. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  19. def toString(): String

    Definition Classes
    AnyRef → Any
  20. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  21. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  22. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  23. def withRetry(delay: Span)(blk: ⇒ Outcome): Outcome

    Retries the given block with a given delay if the Outcome of executing the block is either Failed or Canceled.

    Retries the given block with a given delay if the Outcome of executing the block is either Failed or Canceled.

    The behavior of this method is defined in the table below. The first two rows show the main "retry" behavior: if executing the block initially fails, and on retry it succeeds, the result is Canceled. The purpose of this is to deal with "flickering" tests by downgrading a failure that succeeds on retry to a cancelation. Or, if executing the block initially results in Canceled, and on retry it succeeds, the result is Succeeded. The purpose of this is to deal with tests that intermittently cancel by ignoring a cancelation that succeeds on retry.

    In the table below, if the “Retry Outcome” has just a dash, the block is not retried. Otherwise, the block is retried on the same thread, after sleeping the given delay.

    First OutcomeRetry OutcomeResult
    Failed Succeeded Canceled (the Succeeded and Failed are discarded; the exception from the Failed is the cause of the exception in the Canceled)
    Canceled Succeeded Succeeded (the Canceled is discarded)
    Succeeded Succeeded (no retry)
    Pending Pending (no retry)
    Failed Failed the first Failed (the second Failed is discarded)
    Failed Pending the Failed (the Pending is discarded)
    Failed Canceled the Failed (the Canceled is discarded)
    Canceled Canceled the first Canceled (the second Canceled is discarded)
    Canceled Pending the Canceled (the Pending is discarded)
    Canceled Failed the Failed (the Canceled is discarded)

    delay

    the amount of time to sleep before retrying

    blk

    the block to execute and potentially retry

    Definition Classes
    Retries
  24. def withRetry(blk: ⇒ Outcome): Outcome

    Retries the given block immediately (with no delay) if the Outcome of executing the block is either Failed or Canceled.

    Retries the given block immediately (with no delay) if the Outcome of executing the block is either Failed or Canceled.

    The behavior of this method is defined in the table below. The first two rows show the main "retry" behavior: if executing the block initially fails, and on retry it succeeds, the result is Canceled. The purpose of this is to deal with "flickering" tests by downgrading a failure that succeeds on retry to a cancelation. Or, if executing the block initially results in Canceled, and on retry it succeeds, the result is Succeeded. The purpose of this is to deal with tests that intermittently cancel by ignoring a cancelation that succeeds on retry.

    In the table below, if the “Retry Outcome” has just a dash, the block is not retried. Otherwise, the block is retried on the same thread, with no delay.

    First OutcomeRetry OutcomeResult
    Failed Succeeded Canceled (the Succeeded and Failed are discarded; the exception from the Failed is the cause of the exception in the Canceled)
    Canceled Succeeded Succeeded (the Canceled is discarded)
    Succeeded Succeeded (no retry)
    Pending Pending (no retry)
    Failed Failed the first Failed (the second Failed is discarded)
    Failed Pending the Failed (the Pending is discarded)
    Failed Canceled the Failed (the Canceled is discarded)
    Canceled Canceled the first Canceled (the second Canceled is discarded)
    Canceled Pending the Canceled (the Pending is discarded)
    Canceled Failed the Failed (the Canceled is discarded)

    blk

    the block to execute and potentially retry

    Definition Classes
    Retries
  25. def withRetryOnCancel(delay: Span)(blk: ⇒ Outcome): Outcome

    Retries the given block after the given delay if the Outcome of executing the block is Canceled.

    Retries the given block after the given delay if the Outcome of executing the block is Canceled.

    The behavior of this method is defined in the table below. The first row shows the main "retry" behavior: if executing the block initially results in Canceled, and on retry it succeeds, the result is Succeeded. The purpose of this is to deal with tests that intermittently cancel by ignoring a cancelation that succeeds on retry.

    In the table below, if the “Retry Outcome” has just a dash, the block is not retried. Otherwise, the block is retried on the same thread, after the given delay.

    First OutcomeRetry OutcomeResult
    Canceled Succeeded the Succeeded (the Canceled is discarded)
    Succeeded Succeeded (no retry)
    Pending Pending (no retry)
    Failed Failed (no retry)
    Canceled Canceled the first Canceled (the second Canceled is discarded)
    Canceled Pending the Canceled (the Pending is discarded)
    Canceled Failed the Failed (the Canceled is discarded)

    delay

    the amount of time to sleep before retrying

    blk

    the block to execute and potentially retry

    Definition Classes
    Retries
  26. def withRetryOnCancel(blk: ⇒ Outcome): Outcome

    Retries the given block immediately (with no delay) if the Outcome of executing the block is Canceled.

    Retries the given block immediately (with no delay) if the Outcome of executing the block is Canceled.

    The behavior of this method is defined in the table below. The first row shows the main "retry" behavior: if executing the block initially results in Canceled, and on retry it succeeds, the result is Succeeded. The purpose of this is to deal with tests that intermittently cancel by ignoring a cancelation that succeeds on retry.

    In the table below, if the “Retry Outcome” has just a dash, the block is not retried. Otherwise, the block is retried on the same thread, with no delay.

    First OutcomeRetry OutcomeResult
    Canceled Succeeded the Succeeded (the Canceled is discarded)
    Succeeded Succeeded (no retry)
    Pending Pending (no retry)
    Failed Failed (no retry)
    Canceled Canceled the first Canceled (the second Canceled is discarded)
    Canceled Pending the Canceled (the Pending is discarded)
    Canceled Failed the Failed (the Canceled is discarded)

    blk

    the block to execute and potentially retry

    Definition Classes
    Retries
  27. def withRetryOnFailure(delay: Span)(blk: ⇒ Outcome): Outcome

    Retries the given block immediately with the given delay if the Outcome of executing the block is Failed.

    Retries the given block immediately with the given delay if the Outcome of executing the block is Failed.

    The behavior of this method is defined in the table below. The first row shows the main "retry" behavior: if executing the block initially fails, and on retry it succeeds, the result is Canceled. The purpose of this is to deal with "flickering" tests by downgrading a failure that succeeds on retry to a cancelation.

    In the table below, if the “Retry Outcome” has just a dash, the block is not retried. Otherwise, the block is retried on the same thread, after the given delay.

    First OutcomeRetry OutcomeResult
    Failed Succeeded Canceled (the Succeeded and Failed are discarded; the exception from the Failed is the cause of the exception in the Canceled)
    Succeeded Succeeded (no retry)
    Pending Pending (no retry)
    Canceled the Canceled (no retry)
    Failed Failed the first Failed (the second Failed is discarded)
    Failed Pending the Failed (the Pending is discarded)
    Failed Canceled the Failed (the Canceled is discarded)

    delay

    the amount of time to sleep before retrying

    blk

    the block to execute and potentially retry

    Definition Classes
    Retries
  28. def withRetryOnFailure(blk: ⇒ Outcome): Outcome

    Retries the given block immediately (with no delay) if the Outcome of executing the block is Failed.

    Retries the given block immediately (with no delay) if the Outcome of executing the block is Failed.

    The behavior of this method is defined in the table below. The first row shows the main "retry" behavior: if executing the block initially fails, and on retry it succeeds, the result is Canceled. The purpose of this is to deal with "flickering" tests by downgrading a failure that succeeds on retry to a cancelation.

    In the table below, if the “Retry Outcome” has just a dash, the block is not retried. Otherwise, the block is retried on the same thread, with no delay.

    First OutcomeRetry OutcomeResult
    Failed Succeeded Canceled (the Succeeded and Failed are discarded; the exception from the Failed is the cause of the exception in the Canceled)
    Succeeded Succeeded (no retry)
    Pending Pending (no retry)
    Canceled the Canceled (no retry)
    Failed Failed the first Failed (the second Failed is discarded)
    Failed Pending the Failed (the Pending is discarded)
    Failed Canceled the Failed (the Canceled is discarded)

    blk

    the block to execute and potentially retry

    Definition Classes
    Retries

Inherited from Retries

Inherited from AnyRef

Inherited from Any

Ungrouped