API Testing · Middle · Question 55 of 75
How do you test eventual consistency between two services after an API call?
- 1Poll the second service until the change appears, with a timeout
- 2Check the second service right after the call, once only
- 3Wait a fixed ten seconds and then check the result
Show the answer
Correct answer: Poll the second service until the change appears, with a timeout
Explanation
Polling with a limit is stable and fails clearly when the change never arrives. Fixed sleeps are slow and flaky.