Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Commit 218bf95

Browse files
committed
adds more examples of functions where job_retry is needed
1 parent 3bc05aa commit 218bf95

1 file changed

Lines changed: 24 additions & 6 deletions

File tree

tests/unit/test_client.py

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4892,7 +4892,11 @@ def test_query_preserving_explicit_job_config(self):
48924892
original_config_copy = copy.deepcopy(job_config)
48934893

48944894
client.query(
4895-
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,
48964900
)
48974901

48984902
# Check that query actually starts the job.
@@ -4948,7 +4952,13 @@ def test_query_preserving_explicit_default_job_config(self):
49484952
)
49494953
conn = client._connection = make_connection(resource)
49504954

4951-
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+
)
49524962

49534963
# Check that query actually starts the job.
49544964
conn.api_request.assert_called_once_with(
@@ -4986,7 +4996,11 @@ def test_query_w_invalid_job_config(self):
49864996

49874997
with self.assertRaises(TypeError) as exc:
49884998
client.query(
4989-
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,
49905004
)
49915005
self.assertIn("Expected an instance of QueryJobConfig", exc.exception.args[0])
49925006

@@ -5035,7 +5049,11 @@ def test_query_w_explicit_job_config_override(self):
50355049
job_config.default_dataset = None
50365050

50375051
client.query(
5038-
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,
50395057
)
50405058

50415059
# Check that query actually starts the job.
@@ -5080,7 +5098,7 @@ def test_query_w_client_default_config_no_incoming(self):
50805098
)
50815099
conn = client._connection = make_connection(resource)
50825100

5083-
client.query(query, job_id=job_id, location=self.LOCATION)
5101+
client.query(query, job_id=job_id, location=self.LOCATION, job_retry=None)
50845102

50855103
# Check that query actually starts the job.
50865104
conn.api_request.assert_called_once_with(
@@ -5122,7 +5140,7 @@ def test_query_w_client_location(self):
51225140
)
51235141
conn = client._connection = make_connection(resource)
51245142

5125-
client.query(query, job_id=job_id, project="other-project")
5143+
client.query(query, job_id=job_id, project="other-project", job_retry=None)
51265144

51275145
# Check that query actually starts the job.
51285146
conn.api_request.assert_called_once_with(

0 commit comments

Comments
 (0)