Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion system_tests/logging_.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import logging
import unittest

from google.cloud.exceptions import TooManyRequests
import google.cloud.logging
import google.cloud.logging.handlers.handlers
from google.cloud.logging.handlers.handlers import CloudLoggingHandler
Expand All @@ -28,6 +29,7 @@
_RESOURCE_ID = unique_resource_id('-')
DEFAULT_FILTER = 'logName:syslog AND severity>=INFO'
DEFAULT_DESCRIPTION = 'System testing'
retry_429 = RetryErrors(TooManyRequests)


def _retry_on_unavailable(exc):
Expand Down Expand Up @@ -291,7 +293,8 @@ def _init_storage_bucket(self):
# Create the destination bucket, and set up the ACL to allow
# Stackdriver Logging to write into it.
storage_client = storage.Client()
bucket = storage_client.create_bucket(BUCKET_NAME)
bucket = storage_client.bucket(BUCKET_NAME)
retry_429(bucket.create)()
self.to_delete.append(bucket)
bucket.acl.reload()
logs_group = bucket.acl.group('[email protected]')
Expand Down