Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

'test_bucket_w_default_event_based_hold' systest is flaky #435

Description

@tseaver

From this Kokoro failure:

__________TestRetentionPolicy.test_bucket_w_default_event_based_hold__________self=<test_system.TestRetentionPolicytestMethod=test_bucket_w_default_event_based_hold>deftest_bucket_w_default_event_based_hold(self):
fromgoogle.api_coreimportexceptionsnew_bucket_name="w-def-ebh"+unique_resource_id("-")
self.assertRaises(
exceptions.NotFound, Config.CLIENT.get_bucket, new_bucket_name
)
bucket=retry_429_503(Config.CLIENT.create_bucket)(new_bucket_name)
self.case_buckets_to_delete.append(new_bucket_name)
bucket.default_event_based_hold=Truebucket.patch()
self.assertTrue(bucket.default_event_based_hold)
self.assertIsNone(bucket.retention_period)
self.assertIsNone(bucket.retention_policy_effective_time)
self.assertFalse(bucket.retention_policy_locked)
blob_name="test-blob"payload=b"DEADBEEF"blob=bucket.blob(blob_name)
blob.upload_from_string(payload)
self.case_blobs_to_delete.append(blob)
other=bucket.get_blob(blob_name)
self.assertTrue(other.event_based_hold)
self.assertFalse(other.temporary_hold)
self.assertIsNone(other.retention_expiration_time)
withself.assertRaises(exceptions.Forbidden):
other.delete()
other.event_based_hold=Falseother.patch()
other.delete()
bucket.default_event_based_hold=Falsebucket.patch()
self.assertFalse(bucket.default_event_based_hold)
self.assertIsNone(bucket.retention_period)
self.assertIsNone(bucket.retention_policy_effective_time)
self.assertFalse(bucket.retention_policy_locked)
blob.upload_from_string(payload)
>self.assertFalse(blob.event_based_hold)
EAssertionError: Trueisnotfalsetests/system/test_system.py:2442: AssertionError

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the googleapis/python-storage API.flakyflaky systests / samplestestingtype: processA process-related concern. May include testing, release, or the like.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions