Commit 786526a
committed
test(k8s): register retry classifier suite-wide to kill real retry-sleeps
The k8s handlers wrap kubernetes-client calls in the resilience retry layer; the
K8sRetryClassifier (registered during provider bootstrap in production) marks
404/4xx ApiExceptions as non-retryable. Unit/mocked tests skip bootstrap, so
terminal errors were retried with real 1s time.sleep backoff — a handful of tests
dominated the suite. Add a tree-wide autouse fixture (tests/providers/k8s/
conftest.py) that registers the classifier, mirroring production. Also fix
test_job_deleted_not_found_no_warning_flood to raise a real ApiException(404)
instead of a bare Exception('Not Found') so the classifier recognises it and the
handler fails fast — no is_not_found override or retry-backoff hack needed. k8s
leg ~40s -> ~18s, 1764 passing, no behaviour change.1 parent aa99279 commit 786526a
2 files changed
Lines changed: 48 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
716 | 716 | | |
717 | 717 | | |
718 | 718 | | |
719 | | - | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
720 | 725 | | |
721 | 726 | | |
722 | 727 | | |
| |||
731 | 736 | | |
732 | 737 | | |
733 | 738 | | |
734 | | - | |
735 | | - | |
736 | | - | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
737 | 742 | | |
738 | 743 | | |
739 | 744 | | |
| |||
0 commit comments