Skip to content

Commit

Permalink
tests: ensure test runs after reaching retention period (#911)
Browse files Browse the repository at this point in the history
  • Loading branch information
cojenco authored Nov 18, 2022
1 parent c774ad5 commit 4cd4a04
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/system/test_bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ def test_bucket_w_retention_period(
buckets_to_delete,
blobs_to_delete,
):
period_secs = 10
period_secs = 3
bucket_name = _helpers.unique_name("w-retention-period")
bucket = _helpers.retry_429_503(storage_client.create_bucket)(bucket_name)
buckets_to_delete.append(bucket)
Expand Down Expand Up @@ -679,6 +679,8 @@ def test_bucket_w_retention_period(
assert not other.temporary_hold
assert other.retention_expiration_time is None

# Object can be deleted once it reaches the age defined in the retention policy.
_helpers.await_config_changes_propagate(sec=period_secs)
other.delete()
blobs_to_delete.pop()

Expand Down

0 comments on commit 4cd4a04

Please sign in to comment.