function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Erica CoxErica Cox 

Test code failures in production with no deployment - CPU limit

When running all tests in production environment, test failures are occuring in 4 of 99 test classes with error of Apex CPU time limit exceeded. These test classes run successfully when run singly, and there was a successful deployment a few days ago in which all tests were run. The last change set was backed out by running only selected tests, but still can't run all tests. Users are also experiencing CPU time limit errors. There have been nosubstantial changes to the org or data that we can determine. Has anyone come across something similar?
Alain CabonAlain Cabon
Hello Erica,

Did you use the isTest(SeeAllData=true) Annotation? 

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_seealldata_using.htm

Best regards
Alain