@@ -4719,7 +4719,7 @@ def test_query_w_api_method_query_and_job_id_fails(self):
4719
4719
client ._connection = make_connection ({})
4720
4720
4721
4721
with self .assertRaises (TypeError ) as exc :
4722
- client .query (query , job_id = "abcd" , api_method = "QUERY" )
4722
+ client .query (query , job_id = "abcd" , api_method = "QUERY" , job_retry = None )
4723
4723
self .assertIn (
4724
4724
"`job_id` was provided, but the 'QUERY' `api_method` was requested" ,
4725
4725
exc .exception .args [0 ],
@@ -4774,7 +4774,11 @@ def test_query_w_explicit_project(self):
4774
4774
conn = client ._connection = make_connection (resource )
4775
4775
4776
4776
client .query (
4777
- query , job_id = job_id , project = "other-project" , location = self .LOCATION
4777
+ query ,
4778
+ job_id = job_id ,
4779
+ project = "other-project" ,
4780
+ location = self .LOCATION ,
4781
+ job_retry = None ,
4778
4782
)
4779
4783
4780
4784
# Check that query actually starts the job.
@@ -4833,7 +4837,11 @@ def test_query_w_explicit_job_config(self):
4833
4837
original_config_copy = copy .deepcopy (job_config )
4834
4838
4835
4839
client .query (
4836
- query , job_id = job_id , location = self .LOCATION , job_config = job_config
4840
+ query ,
4841
+ job_id = job_id ,
4842
+ location = self .LOCATION ,
4843
+ job_config = job_config ,
4844
+ job_retry = None ,
4837
4845
)
4838
4846
4839
4847
# Check that query actually starts the job.
@@ -4884,7 +4892,11 @@ def test_query_preserving_explicit_job_config(self):
4884
4892
original_config_copy = copy .deepcopy (job_config )
4885
4893
4886
4894
client .query (
4887
- query , job_id = job_id , location = self .LOCATION , job_config = job_config
4895
+ query ,
4896
+ job_id = job_id ,
4897
+ location = self .LOCATION ,
4898
+ job_config = job_config ,
4899
+ job_retry = None ,
4888
4900
)
4889
4901
4890
4902
# Check that query actually starts the job.
@@ -4940,7 +4952,13 @@ def test_query_preserving_explicit_default_job_config(self):
4940
4952
)
4941
4953
conn = client ._connection = make_connection (resource )
4942
4954
4943
- client .query (query , job_id = job_id , location = self .LOCATION , job_config = None )
4955
+ client .query (
4956
+ query ,
4957
+ job_id = job_id ,
4958
+ location = self .LOCATION ,
4959
+ job_config = None ,
4960
+ job_retry = None ,
4961
+ )
4944
4962
4945
4963
# Check that query actually starts the job.
4946
4964
conn .api_request .assert_called_once_with (
@@ -4978,7 +4996,11 @@ def test_query_w_invalid_job_config(self):
4978
4996
4979
4997
with self .assertRaises (TypeError ) as exc :
4980
4998
client .query (
4981
- query , job_id = job_id , location = self .LOCATION , job_config = job_config
4999
+ query ,
5000
+ job_id = job_id ,
5001
+ location = self .LOCATION ,
5002
+ job_config = job_config ,
5003
+ job_retry = None ,
4982
5004
)
4983
5005
self .assertIn ("Expected an instance of QueryJobConfig" , exc .exception .args [0 ])
4984
5006
@@ -5027,7 +5049,11 @@ def test_query_w_explicit_job_config_override(self):
5027
5049
job_config .default_dataset = None
5028
5050
5029
5051
client .query (
5030
- query , job_id = job_id , location = self .LOCATION , job_config = job_config
5052
+ query ,
5053
+ job_id = job_id ,
5054
+ location = self .LOCATION ,
5055
+ job_config = job_config ,
5056
+ job_retry = None ,
5031
5057
)
5032
5058
5033
5059
# Check that query actually starts the job.
@@ -5072,7 +5098,7 @@ def test_query_w_client_default_config_no_incoming(self):
5072
5098
)
5073
5099
conn = client ._connection = make_connection (resource )
5074
5100
5075
- client .query (query , job_id = job_id , location = self .LOCATION )
5101
+ client .query (query , job_id = job_id , location = self .LOCATION , job_retry = None )
5076
5102
5077
5103
# Check that query actually starts the job.
5078
5104
conn .api_request .assert_called_once_with (
@@ -5114,7 +5140,7 @@ def test_query_w_client_location(self):
5114
5140
)
5115
5141
conn = client ._connection = make_connection (resource )
5116
5142
5117
- client .query (query , job_id = job_id , project = "other-project" )
5143
+ client .query (query , job_id = job_id , project = "other-project" , job_retry = None )
5118
5144
5119
5145
# Check that query actually starts the job.
5120
5146
conn .api_request .assert_called_once_with (
@@ -5178,7 +5204,7 @@ def test_query_w_udf_resources(self):
5178
5204
config .udf_resources = udf_resources
5179
5205
config .use_legacy_sql = True
5180
5206
5181
- job = client .query (QUERY , job_config = config , job_id = JOB )
5207
+ job = client .query (QUERY , job_config = config , job_id = JOB , job_retry = None )
5182
5208
5183
5209
self .assertIsInstance (job , QueryJob )
5184
5210
self .assertIs (job ._client , client )
@@ -5234,7 +5260,7 @@ def test_query_w_query_parameters(self):
5234
5260
config = QueryJobConfig ()
5235
5261
config .query_parameters = query_parameters
5236
5262
5237
- job = client .query (QUERY , job_config = config , job_id = JOB )
5263
+ job = client .query (QUERY , job_config = config , job_id = JOB , job_retry = None )
5238
5264
5239
5265
self .assertIsInstance (job , QueryJob )
5240
5266
self .assertIs (job ._client , client )
@@ -5277,7 +5303,7 @@ def test_query_job_rpc_fail_w_random_error(self):
5277
5303
)
5278
5304
with job_begin_patcher :
5279
5305
with pytest .raises (Unknown , match = "Not sure what went wrong." ):
5280
- client .query ("SELECT 1;" , job_id = "123" )
5306
+ client .query ("SELECT 1;" , job_id = "123" , job_retry = None )
5281
5307
5282
5308
def test_query_job_rpc_fail_w_conflict_job_id_given (self ):
5283
5309
from google .api_core .exceptions import Conflict
@@ -5293,7 +5319,7 @@ def test_query_job_rpc_fail_w_conflict_job_id_given(self):
5293
5319
)
5294
5320
with job_begin_patcher :
5295
5321
with pytest .raises (Conflict , match = "Job already exists." ):
5296
- client .query ("SELECT 1;" , job_id = "123" )
5322
+ client .query ("SELECT 1;" , job_id = "123" , job_retry = None )
5297
5323
5298
5324
def test_query_job_rpc_fail_w_conflict_random_id_job_fetch_fails (self ):
5299
5325
from google .api_core .exceptions import Conflict
0 commit comments