@@ -39,6 +39,8 @@ def _bad_copy(bad_request):
3939
4040
4141retry_429 = RetryErrors (exceptions .TooManyRequests )
42+ retry_429_503 = RetryErrors ([
43+ exceptions .TooManyRequests , exceptions .ServiceUnavailable ])
4244retry_bad_copy = RetryErrors (exceptions .BadRequest ,
4345 error_predicate = _bad_copy )
4446
@@ -938,7 +940,7 @@ def test_notification_minimal(self):
938940 self .case_buckets_to_delete .append (new_bucket_name )
939941 self .assertEqual (list (bucket .list_notifications ()), [])
940942 notification = bucket .notification (self .TOPIC_NAME )
941- retry_429 (notification .create )()
943+ retry_429_503 (notification .create )()
942944 try :
943945 self .assertTrue (notification .exists ())
944946 self .assertIsNotNone (notification .notification_id )
@@ -959,7 +961,7 @@ def test_notification_explicit(self):
959961 blob_name_prefix = self .BLOB_NAME_PREFIX ,
960962 payload_format = self .payload_format (),
961963 )
962- retry_429 (notification .create )()
964+ retry_429_503 (notification .create )()
963965 try :
964966 self .assertTrue (notification .exists ())
965967 self .assertIsNotNone (notification .notification_id )
0 commit comments