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
Rahul_sgRahul_sg 

Batch Apex Test Method: System.UnexpectedException: Error processing messages

Hi Friends,

 

My batch job is failing with the folowing error :

System.UnexpectedException: Error processing messages

 (System Code)

 

In the debug log its pointing to the    Test.stopTest(); line ; which I think has no relation to this issue.

 

My batch job archives the content recods based on business defined criteria. the batch class works fine!

I'm updating ContentDocument records in my batch class. I'm not sure if there is any sfdc limitation on updating this object (ContentDocument) in test run mode.

 

 

 

 

Bhawani SharmaBhawani Sharma
I don't have a concreate answer for your question, but I would say remove Test.stopTest() line from test method and keep database.executeBtach() as last line of test method and let's see what happens. Also make switch your @SeeAllData atribute
Rahul_sgRahul_sg
Thanks for your reply:
However If I remove test.stoptest() and test.starttest() from my test class then I'm getting the following error:
Internal Salesforce Error: 1156486415-6396 (517458374) (517458374).
Do you think I should create a case with SFDC for this?
Bhawani SharmaBhawani Sharma
Yes, please create a case.
Rodrigo Miranda BeltránRodrigo Miranda Beltrán
I am facing the same issue, did you have a resolution on this? Thanks
 
Fabien Flight 8Fabien Flight 8
I am also faced with this issue. I believe it is a bug on Salesforce but Salesforce support will only ackowledge this request for premier support partners