File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -351,7 +351,7 @@ def run(self, client=None):
351
351
:param client: the client to use. If not passed, falls back to the
352
352
``client`` stored on the current dataset.
353
353
"""
354
- if self ._job is not None :
354
+ if self .job is not None :
355
355
raise ValueError ("Query job is already running." )
356
356
357
357
client = self ._require_client (client )
Original file line number Diff line number Diff line change @@ -274,6 +274,15 @@ def test_run_w_already_has_job(self):
274
274
with self .assertRaises (ValueError ):
275
275
query .run ()
276
276
277
+ def test_run_w_already_has_job_in_properties (self ):
278
+ JOB_ID = 'JOB_ID'
279
+ conn = _Connection ()
280
+ client = _Client (project = self .PROJECT , connection = conn )
281
+ query = self ._make_one (self .QUERY , client )
282
+ query ._properties ['jobReference' ] = {'jobId' : JOB_ID }
283
+ with self .assertRaises (ValueError ):
284
+ query .run ()
285
+
277
286
def test_run_w_bound_client (self ):
278
287
PATH = 'projects/%s/queries' % self .PROJECT
279
288
RESOURCE = self ._makeResource (complete = False )
You can’t perform that action at this time.
0 commit comments