Google
PROFESSIONAL-CLOUD-DEVELOPER · Question #214
You are planning to add unit tests to your application. You need to be able to assert that published Pub/Sub messages are processed by your subscriber in order. You want the unit tests to be cost-effe
Sign in or unlock PROFESSIONAL-CLOUD-DEVELOPER to reveal the answer and full explanation for question #214. The question stem and answer options stay visible for context.
Implementing and testing applications
Question
You are planning to add unit tests to your application. You need to be able to assert that published Pub/Sub messages are processed by your subscriber in order. You want the unit tests to be cost-effective and reliable. What should you do?
Options
- AImplement a mocking framework.
- BCreate a topic and subscription for each tester.
- CAdd a filter by tester to the subscription.
- DUse the Pub/Sub emulator.
Unlock PROFESSIONAL-CLOUD-DEVELOPER to see the answer
You've previewed enough free PROFESSIONAL-CLOUD-DEVELOPER questions. Unlock PROFESSIONAL-CLOUD-DEVELOPER for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.
Topics
#Pub/Sub#Unit Testing#GCP Emulators#Message Ordering