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 void
Callfuture.get()
and check that it throws an ExecutionException wrapping theexpectedException
static void
expect
(Class<? extends Exception> expectedException, Exceptions.ExceptionThrowingAction action) Run an action an ensure that the expected exception is thrownstatic void
expectBulkheadException
(Future<?> future) static void
Run an action and check that aBulkheadException
is thrownstatic void
Run an action and check that aCircuitBreakerOpenException
is thrownstatic void
Run an action and ensure that no exception is thrownstatic void
Run an action and check that aTestException
is thrownstatic void
Run 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 aTestException
is thrown- Parameters:
action
- The action to run
-
expectCbOpen
Run an action and check that aCircuitBreakerOpenException
is thrown- Parameters:
action
- The action to run
-
expectBulkheadException
Run an action and check that aBulkheadException
is 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
-