What is a possible ...
 
Notifications
Clear all

What is a possible solution?

1 Posts
1 Users
0 Likes
256 Views
(@ferronigiovanni)
Noble Member
Joined: 2 years ago
Posts: 731
Topic starter  

A developer has working business logic code, but sees the following error in the test class:

You have uncommitted work pending. Please commit or rollback before calling out .

What is a possible solution?

  • A . Rewrite the business logic and test classes with ©TestVisible set on the callout.
  • B . Set seeAIIData to "true" at the top of the test class, since the code does not fail in practice.
  • C . Call support for help with the target endpoint, as it is likely an external code error.
  • D . Use test.IsRunningTest() before making the callout to bypass it in test execution.

Show Answer Hide Answer

Suggested Answer: D

   
Quote

Latest Salesforce PDII Dumps Valid Version

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund
Share: