Commit a6a58a3
test: handle asynchronous namespace deletion in delete test
test_delete_namespace asserted that get() returns None immediately after
delete(), but namespace deletion is asynchronous: delete() returns 202, the
server marks the namespace state="deleting", and a background sweep removes it
later (NAMESPACE_CLEANUP_INTERVAL, default 30s). Against a real 1.38 cluster
get() therefore returned Namespace(state="deleting"), failing the assertion.
Poll until the namespace is gone (asserting it stays in "deleting" while
present) with a 60s timeout that tolerates the default sweep interval. Also set
NAMESPACE_CLEANUP_INTERVAL=2s in the namespaces CI compose so the sweep runs
quickly and the test finishes in ~1s instead of ~30s.
Verified against a live 1.38.0-rc.0 cluster: all 9 namespace integration tests
pass (delete completes in ~0.6s with the shortened interval).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent c80ad35 commit a6a58a3
2 files changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
107 | 109 | | |
108 | 110 | | |
109 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
110 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
111 | 121 | | |
112 | 122 | | |
113 | 123 | | |
| |||
0 commit comments