def wait_till_job_completes(self, job_name, last, type, max_retries=30):
        retries = 0
        while True:
            cur = self.get_last_build_number(job_name, type)
            if cur > last:
                break
            elif retries > max_retries:
                break
            else:
                time.sleep(1)
                retries += 1
dataset/ETHPy150Open redhat-cip/software-factory/tests/functional/utils.py/JenkinsUtils.wait_till_job_completes/original