Interface ThreadedTestSupport.MultiThreadedExecution<T extends Throwable>

Enclosing class:
ThreadedTestSupport

public static interface ThreadedTestSupport.MultiThreadedExecution<T extends Throwable>
Multi-threaded execution.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Indicates if there is currently an error.
    boolean
    Allows to use within predicate checks to throw failure if one.
    void
    Waits for completion of all threads.
  • Method Details

    • waitForCompletion

      void waitForCompletion() throws T
      Waits for completion of all threads.
      Throws:
      T - If failure in a thread.
    • isError

      boolean isError()

      Indicates if there is currently an error.

      This method will not block.

      Returns:
      true if an error.
    • isErrorAndThrow

      boolean isErrorAndThrow() throws T

      Allows to use within predicate checks to throw failure if one.

      This method will not block.

      Returns:
      false always, as will throw failure.
      Throws:
      T - Failure if an error.