-
Notifications
You must be signed in to change notification settings - Fork 13
QueueableProcessTests
APIVERSION: 58
STATUS: ACTIVE
This class contains tests used for testing the QueueableProcess framework.
TESTSETUP
ISTEST
ISTEST
ISTEST
ISTEST
ISTEST
This class is used to mock the FinalizerContext variable dependency injected by SF into the execute method. This allows us to mock a failure in the preceeding QueueableProcess and test the finalizer's behavior.
Implemented types
Param | Description |
---|---|
mockResult |
Returns the ID of the Queueable job for which this finalizer is defined.
Type | Description |
---|---|
Id | Id |
Returns the exception with which the Queueable job failed when getResult is UNHANDLED_EXCEPTION
, null otherwise.
Type | Description |
---|---|
Exception | Exception |
Returns the request ID, a string that uniquely identifies the request, and can be correlated with Event Monitoring logs. To correlate with the AsyncApexJob table, use the getAsyncApexJobId
method instead. The Queueable job and the Finalizer execution both share the (same) request ID.
Type | Description |
---|---|
String | String |
Returns the System.ParentJobResult enum, which represents the result of the parent asynchronous Apex Queueable job to which the finalizer is attached. The enum takes these values: SUCCESS
, UNHANDLED_EXCEPTION
.
Type | Description |
---|---|
ParentJobResult | ParentJobResult |