| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
This PR reduces functional test flakiness by replacing fixed sleeps with a reusable polling helper that waits for GitLab state transitions (mergeability evaluation and merge completion) before proceeding.
Changes:
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/functional/helpers.py | Adds a generic polling helper to replace fixed sleeps and duplicated polling loops. |
| tests/functional/conftest.py | Uses polling in the MR fixture to wait for detailed_merge_status to settle. |
| tests/functional/cli/test_cli_v4.py | Replaces a fixed 30s sleep with polling for mergeability evaluation completion. |
| tests/functional/api/test_merge_requests.py | Replaces duplicated merge-completion polling loops with the shared helper. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
Trying to make the tests less flaky. Have seen some issues with tests needing to be manually re-run due to failures. `test_accept_request_merge` used a blind `time.sleep(30)` before attempting to merge, which was flaky whenever GitLab hadn't finished evaluating mergeability by the time the sleep ended, causing intermittent CI failures with `GitlabMRClosedError: Branch cannot be merged`. Add `helpers.poll_until()`, a generic poll-until-condition-or-fail helper, and use it to replace the blind sleep with a check on `detailed_merge_status`, plus the duplicated `merged_at` polling loops in `test_merge_requests.py` and the `_make_merge_request` fixture in conftest.py. Assisted-by: Claude Sonnet 5
| Back | FazBrowse Home | New Git URL |
Trying to make the tests less flaky. Have seen some issues with tests needing to be manually re-run due to failures.
test_accept_request_merge used a blind time.sleep(30) before attempting to merge, which was flaky whenever GitLab hadn't finished evaluating mergeability by the time the sleep ended, causing intermittent CI failures with GitlabMRClosedError: Branch cannot be merged.
Add helpers.poll_until(), a generic poll-until-condition-or-fail helper, and use it to replace the blind sleep with a check on detailed_merge_status, plus the duplicated merged_at polling loops in test_merge_requests.py and the _make_merge_request fixture in conftest.py.
Assisted-by: Claude Sonnet 5