def runTest(self): while(True): job_status = get_job_status(self.job.job_id) if(job_status.status.lower() == 'finished'): break elif(job_status.status.lower() == 'error'): raise BitcodinError('An error occured while waiting for job to be FINISHED', 'Job status changed to ERROR!') sleep(2) transfer = transfer_job(self.job.job_id, self.output.output_id)
def runTest(self): start_time = time() time_limit = 1200 while True: job_status = get_job_status(self.job.job_id) if(job_status.status.lower() == 'finished'): break elif(job_status.status.lower() == 'error'): raise BitcodinError('An error occured while waiting for job to be FINISHED', 'Job status changed to ERROR!') elif(time() - start_time > time_limit): raise BitcodinError('Timeout of job duration exceeded!', 'Job took too long!') sleep(2) transfer = transfer_job(self.job.job_id, self.output.output_id)
def runTest(self): start_time = time() time_limit = 1200 while(True): job_status = get_job_status(self.job.job_id) if(job_status.status.lower() == 'finished'): break elif(job_status.status.lower() == 'error'): raise BitcodinError('An error occured while waiting for job to be FINISHED', 'Job status changed to ERROR!') elif(time() - start_time > time_limit): raise BitcodinError('Timeout of job duration exceeded!', 'Job took too long!') sleep(2) transfer = transfer_job(self.job.job_id, self.output.output_id)
def runTest(self): start_time = time() time_limit = 1200 while True: job_status = get_job_status(self.job.job_id) if job_status.status.lower() == 'finished': break elif job_status.status.lower() == 'error': raise BitcodinError('An error occured while waiting for job to be FINISHED', 'Job status changed to ERROR!') elif time() - start_time > time_limit: raise BitcodinError('Timeout of job duration exceeded!', 'Job took too long!') sleep(2) with self.assertRaises(BitcodinNotFoundError): transfer = transfer_job(self.job.job_id, 0)
def runTest(self): start_time = time() time_limit = 1200 while True: job_status = get_job_status(self.job.job_id) if job_status.status.lower() == 'finished': break elif job_status.status.lower() == 'error': raise BitcodinError( 'An error occured while waiting for job to be FINISHED', 'Job status changed to ERROR!') elif time() - start_time > time_limit: raise BitcodinError('Timeout of job duration exceeded!', 'Job took too long!') sleep(2) with self.assertRaises(BitcodinNotFoundError): transfer = transfer_job(self.job.job_id, 0)
def runTest(self): job_status = get_job_status(self.job.job_id) self.assertEquals(job_status.job_id, self.job.job_id) self.assertEquals(job_status.status, 'Enqueued')