Class Exceptions
java.lang.Object
org.eclipse.microprofile.fault.tolerance.tck.util.Exceptions
Utility class, no public constructor
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic voidCallfuture.get()and check that it throws an ExecutionException wrapping theexpectedExceptionstatic voidexpect(Class<? extends Exception> expectedException, Exceptions.ExceptionThrowingAction action) Run an action an ensure that the expected exception is thrownstatic voidexpectBulkheadException(Future<?> future) static voidRun an action and check that aBulkheadExceptionis thrownstatic voidRun an action and check that aCircuitBreakerOpenExceptionis thrownstatic voidRun an action and ensure that no exception is thrownstatic voidRun an action and check that aTestExceptionis thrownstatic voidRun an action an check that a timeout exception is thrown
-
Method Details
-
expectTimeout
Run an action an check that a timeout exception is thrown- Parameters:
action- The action to run
-
expectTestException
Run an action and check that aTestExceptionis thrown- Parameters:
action- The action to run
-
expectCbOpen
Run an action and check that aCircuitBreakerOpenExceptionis thrown- Parameters:
action- The action to run
-
expectBulkheadException
Run an action and check that aBulkheadExceptionis thrown- Parameters:
action- The action to run
-
expectBulkheadException
- Parameters:
future- the action to run
-
expect
Callfuture.get()and check that it throws an ExecutionException wrapping theexpectedException- Parameters:
expectedException- the expected exception typefuture- the future to check
-
expect
public static void expect(Class<? extends Exception> expectedException, Exceptions.ExceptionThrowingAction action) Run an action an ensure that the expected exception is thrown- Parameters:
expectedException- the exception class to expectaction- the action to run
-
expectNoException
Run an action and ensure that no exception is thrown- Parameters:
action- the action to run
-