ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 249 - Certified Platform Developer II discussion

Report
Export

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.
Answers
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.
Answers
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.
Answers
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.
Answers
D.
Use test.IsRunningTest() before making the callout to bypass it in test execution.
Suggested answer: D
asked 23/09/2024
Wilfried Bret
30 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first