You need to sign in to do that
Don't have an account?
SF Beginner 2019
HI,
I need help on queuable test class.
it doesn't cover this portion.
Queueable test class
Integer counter = UPDTACCOWNRLMT; List<Account> newList = New List<Account>(); AccOwnerUpdateQueueble updateJob; for (Integer j=0; j < updtAccLst.size() ;j++){ if(j < counter ){ newList.add(updtAccLst[j]); } if(j == counter && Limits.getQueueableJobs() == 0){ newList.add(updtAccLst[j]); updateJob = new AccOwnerUpdateQueueble(newList); ID jobID = System.enqueueJob(updateJob); counter = counter + UPDTACCOWNRLMT; newList.clear(); } } if(!newList.isEmpty() && (Limits.getQueueableJobs() == 0) ){ // system.debug('newList size'+newList.size()); updateJob = new AccOwnerUpdateQueueble(newList); ID jobID = System.enqueueJob(updateJob); counter = counter + UPDTACCOWNRLMT; newList.clear(); } }
HI,
I need help on queuable test class.
it doesn't cover this portion.
Greetings!
Please check the sample code for testing Queuable class in the below documents:
https://www.biswajeetsamal.com/blog/queueable-apex-in-salesforce/
https://trailhead.salesforce.com/en/content/learn/modules/asynchronous_apex/async_apex_queueable
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Warm Regards,
Shirisha Pathuri