1

I'm getting an error I've not seen before when running Unit Tests both

  • synchronously
    • enter image description here
  • asynchronously
    • enter image description here

System.LimitException: Apex CPU time limit exceeded

I know this error means that whatever action is being executed is taking too long, but I've not seen this before when executing Unit Tests.

This error is happening on Unit Tests that had no problems before and didn't show any warnings about long-running execution times when I've deployed it previously and having deployed something to Production yesterday, the code will execute and pass, I just can't seem to run Unit Tests in Sandboxes.

I have recently refreshed sandboxes and the problem is happening in both Sandboxes.

The problem started yesterday and I figured it might just be a server problem, however it's still persisting today.

Has anyone else gotten this problem? Is there a workaround?

Edit

The sandboxes are on two different instances: CS85 and CS88. I've looked on trust.salesforce.com and they're both in the green.

  • what is an instance location of your environments? – Oleksandr Berehovskyi Jul 20 '17 at 11:34
  • @AlexanderBerehovskiy Two different instances: CS85 and CS88. I've just looked on trust.salesforce.com and they're both in the green. – Dan Jones Jul 20 '17 at 11:35
  • @DanJones Have a look at the debug logs. They will show you where all the CPU time is going. – Daniel Ballinger Jul 25 '17 at 22:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.