From 9bf49f51df5321e8b9c39018dff7d767347256d6 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Tue, 12 Jan 2021 10:58:47 -0800 Subject: [PATCH] fix: add InternalServerError to list of expected errors (#151) --- tests/system/test_system.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/system/test_system.py b/tests/system/test_system.py index dc578515..45126f5e 100644 --- a/tests/system/test_system.py +++ b/tests/system/test_system.py @@ -20,6 +20,7 @@ from google.api_core.exceptions import BadGateway from google.api_core.exceptions import Conflict +from google.api_core.exceptions import InternalServerError from google.api_core.exceptions import NotFound from google.api_core.exceptions import TooManyRequests from google.api_core.exceptions import ResourceExhausted @@ -68,7 +69,9 @@ def _list_entries(logger): :returns: List of all entries consumed. """ inner = RetryResult(_has_entries, max_tries=9)(_consume_entries) - outer = RetryErrors((ServiceUnavailable, ResourceExhausted), max_tries=9)(inner) + outer = RetryErrors( + (ServiceUnavailable, ResourceExhausted, InternalServerError), max_tries=9 + )(inner) return outer(logger)