@@ -695,66 +695,3 @@ def test_retry_load_job_result(result_retry_param, PROJECT, DS_ID):
695695 # The number of api_request calls should still be 3
696696 assert conn .api_request .call_count == 3
697697
698-
699- # @pytest.mark.parametrize(
700- # "result_retry",
701- # [
702- # pytest.param(
703- # {},
704- # id="default retry use case",
705- # ),
706- # pytest.param(
707- # {
708- # "retry": google.cloud.bigquery.retry.DEFAULT_RETRY.with_timeout(
709- # timeout=10.0
710- # )
711- # },
712- # id="custom retry object use case",
713- # ),
714- # ],
715- # )
716- # def test_retry_load_job_result(result_retry, PROJECT, DS_ID):
717-
718- # from google.cloud.bigquery.dataset import DatasetReference
719- # from google.cloud.bigquery.job.load import LoadJob
720- # import google.cloud.bigquery.retry
721-
722- # client = make_client()
723- # conn = client._connection = make_connection(
724- # dict(
725- # status=dict(state="RUNNING"),
726- # jobReference={"jobId": "id_1"},
727- # ),
728- # google.api_core.exceptions.ServiceUnavailable("retry me"),
729- # dict(
730- # status=dict(state="DONE"),
731- # jobReference={"jobId": "id_1"},
732- # statistics={"load": {"outputRows": 1}},
733- # ),
734- # )
735-
736- # table_ref = DatasetReference(project=PROJECT, dataset_id=DS_ID).table("new_table")
737- # job = LoadJob("id_1", source_uris=None, destination=table_ref, client=client)
738- # result = job.result(**result_retry)
739-
740- # print(f"Test Case ID: {result_retry}")
741- # for call in conn.api_request.mock_calls:
742- # name, args, kwargs = call
743- # print(f" Call to api_request with kwargs: {kwargs}")
744-
745- # if result_retry:
746- # custom_retry_used = False
747- # for name, args, kwargs in conn.api_request.mock_calls:
748- # if 'retry' in kwargs:
749- # # Check if the retry object passed has the custom timeout
750- # if kwargs['retry']._timeout == 10.0:
751- # custom_retry_used = True
752- # assert kwargs['retry']._deadline == 10.0 # Deadline should also be updated
753- # # Optional: check other properties if needed
754- # assert custom_retry_used, "Custom retry object with timeout 10.0 was not used"
755-
756- # assert job.state == "DONE"
757- # assert result.output_rows == 1
758-
759- # # We made all the calls we expected to.
760- # assert conn.api_request.call_count == 3
0 commit comments