Skip to content

Commit

Permalink
Fix test_retrieve_jobs_limit (#79)
Browse files Browse the repository at this point in the history
* use unique program

* filter by program id
  • Loading branch information
jyu00 authored Jan 7, 2022
1 parent 11badd9 commit 3be2a20
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/test_integration_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,13 @@ def test_retrieve_jobs_limit(self, service):
for _ in range(3):
jobs.append(self._run_program(service))

rjobs = service.jobs(limit=2)
rjobs = service.jobs(limit=2, program_id=self.program_ids[service.auth])
self.assertEqual(len(rjobs), 2)
job_ids = {job.job_id for job in jobs}
rjob_ids = {rjob.job_id for rjob in rjobs}
self.assertTrue(rjob_ids.issubset(job_ids))
self.assertTrue(
rjob_ids.issubset(job_ids), f"Submitted: {job_ids}, Retrieved: {rjob_ids}"
)

@run_cloud_legacy_real
def test_retrieve_pending_jobs(self, service):
Expand Down

0 comments on commit 3be2a20

Please sign in to comment.