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
frogfrog 

stateful batch instance variable state after finish

Hello

 

I was  writing a test for my stateful batch class. The Class has a map where it gather manager's ids and information it needs to send to them on finish. When I look through the logs I see the e-mils being sent but I wanted to programmatically test it by accessing the map content after execution.

 

The map is empty when I finish test.  What magic causes this? Is it cleaned on context switch and reverted to the state it was  after construction? What could be the way of testing changes that do not affect records and can't be checked by soql queries.?

 

regards