diff --git a/.changes/unreleased/Features-20240505-011838.yaml b/.changes/unreleased/Features-20240505-011838.yaml new file mode 100644 index 000000000..66411853f --- /dev/null +++ b/.changes/unreleased/Features-20240505-011838.yaml @@ -0,0 +1,6 @@ +kind: Features +body: add is_retryable test case when raise ServiceUnavailable +time: 2024-05-05T01:18:38.737882+09:00 +custom: + Author: jx2lee + Issue: "682" diff --git a/tests/unit/test_bigquery_connection_manager.py b/tests/unit/test_bigquery_connection_manager.py index d09cb1635..1c14100f6 100644 --- a/tests/unit/test_bigquery_connection_manager.py +++ b/tests/unit/test_bigquery_connection_manager.py @@ -84,12 +84,14 @@ def test_is_retryable(self): rate_limit_error = exceptions.Forbidden( "code broke", errors=[{"reason": "rateLimitExceeded"}] ) + service_unavailable_error = exceptions.ServiceUnavailable("service is unavailable") self.assertTrue(_is_retryable(internal_server_error)) self.assertTrue(_is_retryable(bad_request_error)) self.assertTrue(_is_retryable(connection_error)) self.assertFalse(_is_retryable(client_error)) self.assertTrue(_is_retryable(rate_limit_error)) + self.assertTrue(_is_retryable(service_unavailable_error)) def test_drop_dataset(self): mock_table = Mock()