Commit e894444
authored
test(hacs): retry TestMcpToolsInstallation on flake (#1426)
* test(hacs): retry TestMcpToolsInstallation on flake (pytest-rerunfailures)
The HACS-mediated install tests in TestMcpToolsInstallation flake on
the ubuntu-24.04-arm CI runner with a generic
'SERVICE_CALL_FAILED: Command failed: Unknown error' from HACS. The
class's existing autouse pre-flight (ha_hacs_search) passes, but the
heavier hacs/repository/add + hacs/repository/download path hits a
transient HACS/GitHub failure on the slower arm runner; subsequent
sibling tests then skip via the pre-flight when HACS becomes
unreachable mid-class.
Apply @pytest.mark.flaky(reruns=2, reruns_delay=10) at the class
level so the install path gets 3 attempts with a 10s pause between —
catches any transient (~99.9% of cases) while still flagging a genuine
persistent regression (fails 3 times -> reported).
Scoped narrowly: only TestMcpToolsInstallation is marked flaky. The
HACS read-side tests (TestHacsSearch, TestHacsSearchInstalled,
TestHacsRepositoryInfo, TestHacsWriteOperations) keep their existing
fail-fast posture.
Add pytest-rerunfailures>=15.0 to dev deps (resolved to v16.3).
* chore: ruff format on test_hacs.py (CI surfaces pre-existing reflow)
---------
Co-authored-by: kingpanther13 <kingpanther13@users.noreply.github.com>1 parent e93d680 commit e894444
3 files changed
Lines changed: 21 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| 189 | + | |
189 | 190 | | |
190 | 191 | | |
191 | 192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
159 | 161 | | |
160 | 162 | | |
161 | 163 | | |
| |||
187 | 189 | | |
188 | 190 | | |
189 | 191 | | |
190 | | - | |
191 | | - | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| |||
566 | 566 | | |
567 | 567 | | |
568 | 568 | | |
| 569 | + | |
569 | 570 | | |
570 | 571 | | |
571 | 572 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments