Skip to content

Commit

Permalink
Harden system tests against 'ResourceExhausted' quota errors.
Browse files Browse the repository at this point in the history
Closes #5303.
  • Loading branch information
tseaver committed Jun 14, 2018
1 parent 71a0c9c commit bbee15c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions logging/tests/system/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
import logging
import unittest

from google.api_core.exceptions import Conflict
from google.api_core.exceptions import NotFound
from google.api_core.exceptions import TooManyRequests
from google.api_core.exceptions import ResourceExhausted
from google.api_core.exceptions import ServiceUnavailable
from google.cloud._helpers import UTC
from google.cloud.exceptions import Conflict
from google.cloud.exceptions import NotFound
from google.cloud.exceptions import TooManyRequests
from google.cloud.exceptions import ServiceUnavailable
import google.cloud.logging
import google.cloud.logging.handlers.handlers
from google.cloud.logging.handlers.handlers import CloudLoggingHandler
Expand Down Expand Up @@ -63,7 +64,7 @@ def _list_entries(logger):
:returns: List of all entries consumed.
"""
inner = RetryResult(_has_entries)(_consume_entries)
outer = RetryErrors(ServiceUnavailable)(inner)
outer = RetryErrors((ServiceUnavailable, ResourceExhausted))(inner)
return outer(logger)


Expand Down

0 comments on commit bbee15c

Please sign in to comment.