Skip to content

Commit

Permalink
added pytest.mark.flaky for test_big_query_write_temp_table_append_sc… (
Browse files Browse the repository at this point in the history
#31364)

* added pytest.mark.flaky for test_big_query_write_temp_table_append_schema_update

* updated the version

* only run flaky when it is available

* switched to tenacity

* fixed the isort
  • Loading branch information
liferoad authored May 24, 2024
1 parent ca00272 commit 3b9b6ed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sdks/python/apache_beam/io/gcp/bigquery_write_it_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit 3b9b6ed

Please sign in to comment.