diff --git a/packages/google-cloud-spanner/tests/system/test_instance_api.py b/packages/google-cloud-spanner/tests/system/test_instance_api.py index 2e0ccc0d6f44..1e29666c4300 100644 --- a/packages/google-cloud-spanner/tests/system/test_instance_api.py +++ b/packages/google-cloud-spanner/tests/system/test_instance_api.py @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +import time + import pytest from test_utils import retry @@ -77,7 +79,10 @@ def test_create_instance( instance_operation_timeout, ): alt_instance_id = _helpers.unique_id("new") - instance = spanner_client.instance(alt_instance_id, instance_config.name) + labels = {"python-spanner-systests": "true", "created": str(int(time.time()))} + instance = spanner_client.instance( + alt_instance_id, instance_config.name, labels=labels + ) operation = instance.create() # Make sure this instance gets deleted after the test case. instances_to_delete.append(instance) @@ -102,10 +107,12 @@ def test_create_instance_with_processing_units( ): alt_instance_id = _helpers.unique_id("wpn") processing_units = 5000 + labels = {"python-spanner-systests": "true", "created": str(int(time.time()))} instance = spanner_client.instance( instance_id=alt_instance_id, configuration_name=instance_config.name, processing_units=processing_units, + labels=labels, ) operation = instance.create() # Make sure this instance gets deleted after the test case.