Package com.uber.cadence.testing
Class SimulatedTimeoutException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.uber.cadence.testing.SimulatedTimeoutException
-
- All Implemented Interfaces:
java.io.Serializable
public final class SimulatedTimeoutException extends java.lang.RuntimeException
SimulatedTimeoutException can be thrown from an activity or child workflow implementation to simulate a timeout. To be used only in unit tests. If thrown from an activity the workflow code is going to receive it asActivityTimeoutException
. If thrown from a child workflow the workflow code is going to receive it asChildWorkflowTimedOutException
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SimulatedTimeoutException()
Creates an instance with no details and START_TO_CLOSE timeout.SimulatedTimeoutException(TimeoutType timeoutType)
Creates an instance with specific timeoutType and empty details.SimulatedTimeoutException(TimeoutType timeoutType, java.lang.Object details)
Creates an instance with specific timeoutType and details.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getDetails()
TimeoutType
getTimeoutType()
-
-
-
Constructor Detail
-
SimulatedTimeoutException
public SimulatedTimeoutException(TimeoutType timeoutType, java.lang.Object details)
Creates an instance with specific timeoutType and details. Use this constructor to simulate an activity timeout.- Parameters:
timeoutType
- timeout type to simulatedetails
- details included into the timeout exception.
-
SimulatedTimeoutException
public SimulatedTimeoutException()
Creates an instance with no details and START_TO_CLOSE timeout. Use this constructor to simulate a child workflow timeout.
-
SimulatedTimeoutException
public SimulatedTimeoutException(TimeoutType timeoutType)
Creates an instance with specific timeoutType and empty details. Use this constructor to simulate an activity timeout.- Parameters:
timeoutType
- timeout type to simulate
-
-
Method Detail
-
getTimeoutType
public TimeoutType getTimeoutType()
-
getDetails
public java.lang.Object getDetails()
-
-