File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -351,7 +351,7 @@ def run(self, client=None):
351351 :param client: the client to use. If not passed, falls back to the
352352 ``client`` stored on the current dataset.
353353 """
354- if self ._job is not None :
354+ if self .job is not None :
355355 raise ValueError ("Query job is already running." )
356356
357357 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):
274274 with self .assertRaises (ValueError ):
275275 query .run ()
276276
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+
277286 def test_run_w_bound_client (self ):
278287 PATH = 'projects/%s/queries' % self .PROJECT
279288 RESOURCE = self ._makeResource (complete = False )
You can’t perform that action at this time.
0 commit comments