| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2dda9dc commit e4673d8
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,3 +1,4 @@ | |||
| 1 | + import logging | ||
| 1 | 2 | import subprocess | |
| 2 | 3 | import textwrap | |
| 3 | 4 | import time | |
@@ -24,12 +25,22 @@ | |||
| 24 | 25 | ||
| 25 | 26 | @pytest.fixture(scope="module") | |
| 26 | 27 | def job_with_artifacts(gitlab_runner, project): | |
| 28 | + start_time = time.time() | ||
| 29 | + | ||
| 27 | 30 | project.files.create(data) | |
| 28 | 31 | ||
| 29 | 32 | jobs = None | |
| 30 | 33 | while not jobs: | |
| 31 | 34 | time.sleep(0.5) | |
| 32 | 35 | jobs = project.jobs.list(scope="success") | |
| 36 | + if time.time() - start_time < 60: | ||
| 37 | + continue | ||
| 38 | + logging.error("job never succeeded") | ||
| 39 | + for job in project.jobs.list(): | ||
| 40 | + job = project.jobs.get(job.id) | ||
| 41 | + logging.info(f"{job.status} job: {job.pformat()}") | ||
| 42 | + logging.info(f"job log:\n{job.trace()}\n") | ||
| 43 | + pytest.fail("Fixture 'job_with_artifact' failed") | ||
| 33 | 44 | ||
| 34 | 45 | return project.jobs.get(jobs[0].id) | |
| 35 | 46 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments