diff --git a/sdks/python/apache_beam/io/gcp/bigquery_write_it_test.py b/sdks/python/apache_beam/io/gcp/bigquery_write_it_test.py index 4b728fe7ec1f..4c8e8ebf489a 100644 --- a/sdks/python/apache_beam/io/gcp/bigquery_write_it_test.py +++ b/sdks/python/apache_beam/io/gcp/bigquery_write_it_test.py @@ -34,6 +34,8 @@ import pytz from parameterized import param from parameterized import parameterized +from tenacity import retry +from tenacity import stop_after_attempt import apache_beam as beam from apache_beam.io.gcp.bigquery import BigQueryWriteFn @@ -457,7 +459,7 @@ def test_big_query_write_insert_errors_reporting(self): @pytest.mark.it_postcommit def test_big_query_write_insert_non_transient_api_call_error(self): """ - Test that non-transient GoogleAPICallError errors returned + Test that non-transient GoogleAPICallError errors returned by beam.io.WriteToBigQuery are not retried and result in FAILED_ROWS containing both the failed rows and the reason for failure. @@ -504,6 +506,7 @@ def test_big_query_write_insert_non_transient_api_call_error(self): equal_to(bq_result_errors)) @pytest.mark.it_postcommit + @retry(reraise=True, stop=stop_after_attempt(3)) @parameterized.expand([ param(file_format=FileFormat.AVRO), param(file_format=FileFormat.JSON),