We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ca369a commit 4975936Copy full SHA for 4975936
packages/google-cloud-storage/tests/system/conftest.py
@@ -150,7 +150,11 @@ def hierarchy_bucket_name():
150
@pytest.fixture(scope="session")
151
def hierarchy_bucket(storage_client, hierarchy_bucket_name, file_data):
152
bucket = storage_client.bucket(hierarchy_bucket_name)
153
- _helpers.retry_429_503(bucket.create)()
+ # Create the hierarchy bucket only if it doesn't yet exist.
154
+ try:
155
+ storage_client.get_bucket(bucket)
156
+ except exceptions.NotFound:
157
+ _helpers.retry_429_503(bucket.create)()
158
159
simple_path = _file_data["simple"]["path"]
160
for filename in _hierarchy_filenames:
0 commit comments