test: mark use_old_releases integration test as slow
Metadata
Current evaluation
Merged PR #270, which marks test_use_old_releases as slow to exclude it from fast test runs, following up on #269.
Resolution: closed resolved
Reason: The PR was merged, adding @pytest.mark.slow to test_use_old_releases to prevent unnecessary network calls during fast test runs.
Evaluated by: mr-cal-bot
No scores available.
Issue body
## Summary
Follow-up to #269, which marked `test_is_on_old_releases_real_ubuntu` and `test_is_on_old_releases_custom` as slow but missed `test_use_old_releases`. That test also performs real HTTP requests, indirectly: `use_old_releases()` calls `_is_on_old_releases()` for each suite in the fixture data (`craft_archives/defaults.py`). In fast runs the `functools.cache` is cold, so every parametrization hits `old-releases.ubuntu.com` — the `precise_deb822` param alone took ~20s when `precise-security` had no cached answer.
Marking it with `@pytest.mark.slow` keeps the real-server coverage in `make test-slow` while excluding it from `make test-fast`.
## Changes
- `tests/integration/test_defaults.py`: mark `test_use_old_releases` with `@pytest.mark.slow`.
## Validation
- `make test-fast`: 241 passed, 1 skipped, 20 deselected in 0.67s
- `make lint-code`: passes
- Full-file duration before the change (local run): 225s total, dominated by the now-marked network tests
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | closed resolved | Merged PR #270, which marks test_use_old_releases as slow to exclude it from fast test runs, following up on #269. | |
| qwen/qwen3.6-35b-a3b |
Impact:
10
Quick Win:
8
Complexity:
5
Confidence:
85
Actionability:
80
|
needs review | Adds @pytest.mark.slow to test_use_old_releases, following up on merged PR #269. 1-line change, CI passing, awaiting review. |
Update history
| Date | Change |
|---|---|
| merged | |
| updated | |
| created |
Related work
-
Related To:
craft-archives#269
(confidence 95%)
Follow-up PR that marked other similar tests as slow.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #269 test: mark is_on_old_releases tests as slow | craft-archives | merged | Marked test_is_on_old_releases_real_ubuntu and test_is_on_old_releases_custom with @pytest.mark.slow in merged PR #269 to prevent network timeouts from blocking fast test runs. | |
| #5277 test: mark all legacy tests as slow | snapcraft | merged | Merged in #5277 via commit 85a8b7ccb, marking all legacy tests as slow so make test-fast excludes them. |