Example #1
0
 def test_multiple_jobs(self):
     self.prov = providers.stub.StubJobProvider()
     establish_chronology(self.progressive_chronology())
     ret = dsub.wait_for_any_job(self.prov, ['job-1', 'job-2'], 1)
     self.assertEqual(ret, set(['job-2']))
Example #2
0
 def test_already_succeeded(self):
     prov = providers.stub.StubJobProvider()
     prov.set_operations([{'job-id': 'myjob', 'status': 'SUCCESS'}])
     establish_chronology(nothing_happens())
     ret = dsub.wait_for_any_job(prov, ['myjob'], 1)
     self.assertEqual(ret, set([]))