• charles jonas
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hello.  I started using the the WebServiceMock interface shortly after it came out, but there was an issue where it would throw the "uncommitted work pending" exception.  this is found elsewhere in the forums.  i recently had the need to use WebServiceMock again - and i found that the issue was resolved (https://developer.salesforce.com/forums?id=906F0000000927CIAQ) - so i tried it.  but i'm still having the same issue - sometimes.   My callout happens either as the result of a trigger execution or a batch process.  With the trigger, it works perfectly - no "uncommited work pending" exception.  however when i call it from my batch process, i'm still seeing the same issue.

a few notes here.  i've confirmed that all of my code is v29.  in my batch process, i disable the trigger - so it's not like the callout is firing multiple times.  i've implemented my test method per the instructions noted in the linkd above (first setup data, then calling Test.startTest, then setMock, then do callout, then call stopTest.  i've checked the debug log thoroughly - there is no dml between my Test.startTest and the callout.  so this is a bit mysterious to me.  is anyone seeing a similar issue?

thanks
chris