Timeline for Testing scheduled apex: CronTrigger does NOT fire after Test.stopTest()
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 23, 2016 at 20:45 | comment | added | smohyee | One other difference from sample code provided by SF documentation is that I have SeeAllData=True set, which is necessary for another test method in that same test class. Can't imagine it's relevant, but then IDK... | |
Mar 23, 2016 at 20:42 | comment | added | Derek F | So much for the easy answer. I'm afraid that I'm stumped. | |
Mar 23, 2016 at 20:37 | comment | added | smohyee |
(I threw a system.debug('Cron - post: ' + ct); line after requerying and confirmed that ct.TimesTriggered didn't increment)
|
|
Mar 23, 2016 at 20:34 | comment | added | smohyee | Sorry, I had removed that line from the example I pasted for some reason. I did indeed requery crontrigger after test.stopTest(), and timestriggered was still 0. Updating code in post to reflect that. | |
Mar 23, 2016 at 20:02 | history | answered | Derek F | CC BY-SA 3.0 |