From e5379b28270e72e78cbedcc7e452ff628b22c982 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Thu, 8 Aug 2019 15:49:23 -0400 Subject: [PATCH] Harden 'test_access_to_public_bucket' against 429 / 503 errors. --- storage/tests/system.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/tests/system.py b/storage/tests/system.py index 1a63409fdd24..c2717fb2b1af 100644 --- a/storage/tests/system.py +++ b/storage/tests/system.py @@ -1335,9 +1335,9 @@ class TestAnonymousClient(unittest.TestCase): def test_access_to_public_bucket(self): anonymous = storage.Client.create_anonymous_client() bucket = anonymous.bucket(self.PUBLIC_BUCKET) - blob, = bucket.list_blobs(max_results=1) + blob, = retry_429_503(bucket.list_blobs)(max_results=1) with tempfile.TemporaryFile() as stream: - blob.download_to_file(stream) + retry_429_503(blob.download_to_file)(stream) class TestKMSIntegration(TestStorageFiles):