Skip to content

Latest commit

 

History

History
9 lines (5 loc) · 536 Bytes

README.md

File metadata and controls

9 lines (5 loc) · 536 Bytes

Trying out Batch vs Queueable chaining in Unit tests

While Queueable chaining has to be prevented in Unit tests (otherwise exception is thown) Batch is happy to go round 50 times

Test Scenario

Account custom field HierarchyValue should be updated for all children of an updated Account. The approach to demonstrate is to use Batch/Queueabe to update immediate Child Accounts of the changed Accounts and re-trigger the same job one level lower.

While this works fine for both situations, in Unit Tests it only works for Batch.