Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0ac6a99

Browse filesBrowse files
committed
Harden system tests against 'ResourceExhausted' quota errors.
Closes #5303.
1 parent 2b86a0f commit 0ac6a99
Copy full SHA for 0ac6a99

File tree

Expand file treeCollapse file tree

1 file changed

+6
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-5
lines changed

‎logging/tests/system/test_system.py

Copy file name to clipboardExpand all lines: logging/tests/system/test_system.py
+6-5Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@
1616
import logging
1717
import unittest
1818

19+
from google.api_core.exceptions import Conflict
20+
from google.api_core.exceptions import NotFound
21+
from google.api_core.exceptions import TooManyRequests
22+
from google.api_core.exceptions import ResourceExhausted
23+
from google.api_core.exceptions import ServiceUnavailable
1924
from google.cloud._helpers import UTC
20-
from google.cloud.exceptions import Conflict
21-
from google.cloud.exceptions import NotFound
22-
from google.cloud.exceptions import TooManyRequests
23-
from google.cloud.exceptions import ServiceUnavailable
2425
import google.cloud.logging
2526
import google.cloud.logging.handlers.handlers
2627
from google.cloud.logging.handlers.handlers import CloudLoggingHandler
@@ -63,7 +64,7 @@ def _list_entries(logger):
6364
:returns: List of all entries consumed.
6465
"""
6566
inner = RetryResult(_has_entries)(_consume_entries)
66-
outer = RetryErrors(ServiceUnavailable)(inner)
67+
outer = RetryErrors((ServiceUnavailable, ResourceExhausted))(inner)
6768
return outer(logger)
6869

6970

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.