We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d6d5c48 commit 7d6ad43Copy full SHA for 7d6ad43
tests/system/_helpers.py
@@ -115,9 +115,19 @@ def scrub_instance_ignore_not_found(to_scrub):
115
"""Helper for func:`cleanup_old_instances`"""
116
scrub_instance_backups(to_scrub)
117
118
+ for database_pb in to_scrub.list_databases():
119
+ db = to_scrub.database(database_pb.name.split("/")[-1])
120
+ try:
121
+ if db.enable_drop_protection:
122
+ db.enable_drop_protection = False
123
+ operation = db.update(["enable_drop_protection"])
124
+ operation.result(DATABASE_OPERATION_TIMEOUT_IN_SECONDS)
125
+ except exceptions.NotFound:
126
+ pass
127
+
128
try:
129
retry_429_503(to_scrub.delete)()
- except exceptions.NotFound: # lost the race
130
131
pass
132
133
0 commit comments