You want automated performance tests for Cloud Spanner run by Cloud Build for every commit; tests may run concurrently. How should you provision test databases to avoid interference?
Choose an answer
Tap an option to check your answer.
Correct answer: Create a new Cloud Spanner instance for every build, load the required data, and delete the instance after the test..
Why this is the answer
Creating a new Cloud Spanner instance for every build ensures complete isolation for each test run, preventing interference and ensuring consistent, reproducible results. Spanner instances are isolated environments, making them ideal for concurrent testing. Deleting the instance afterward cleans up resources. Creating a new Google Cloud project for every build is overkill and incurs significant overhead, as project creation and deletion are slower and more resource-intensive than Spanner instance operations. Restoring data to a previous state after each test is prone to errors, complex to manage, and doesn't guarantee complete isolation from concurrent tests. Running the Cloud Spanner emulator locally is not suitable for automated performance tests in a Cloud Build environment, as it's designed for local development and lacks the scalability and reliability of a production Spanner instance.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed