You need to sign in to do that
Don't have an account?

Flex queue in testschedule
Hi,
I have a scheduled class which calls almost 15 batch jobs. I have manually invoked these batch jobs and flex queue is taking care of the 5 concurrent jobs limit. But when the scheduled class is invoked in a test class it throws an error showing that more than 5 jobs cannot be queued. Do I have to specify jobs in flex queue in test classes? I cannot find any such thing in documentation
I have a scheduled class which calls almost 15 batch jobs. I have manually invoked these batch jobs and flex queue is taking care of the 5 concurrent jobs limit. But when the scheduled class is invoked in a test class it throws an error showing that more than 5 jobs cannot be queued. Do I have to specify jobs in flex queue in test classes? I cannot find any such thing in documentation
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm
To avoid this test failure, you may use "isRunningTest()" method from "Test" class to detect the execution context, for instance:
All Answers
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm
To avoid this test failure, you may use "isRunningTest()" method from "Test" class to detect the execution context, for instance:
Thanks for clearing that up. I thought the latest flex queue would take care of this for me.