Repository navigation
Commit 52ce518
committed
test(capture-dispatch): the dispatch tests own their capture root on every platform (#693)
TestCaptureDispatch patched CORTEX_CLAUDE_DIR in os.environ, but
capture_dispatch reads CLAUDE_DIR once at import, so the patch never reached
dispatch(). On a platform without the resident worker (native Windows),
test_spawn_or_transport_failure_is_logged_and_telemetried took the spool
path: it wrote a spool file into the suite's shared capture root and started
a real detached drainer. That file is the one test_capture_drain found
before writing (issue #693).
- setUp also patches capture_dispatch.CLAUDE_DIR to the test's temporary root.
- The transport-failure test pins is_supported to True: it targets deliver().
- New test: with is_supported False and the drainer mocked, the spool file lands
under the test root and the shared root is unchanged. It fails without the
CLAUDE_DIR patch.
Refs #693
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018kyZYqW7pSQ4T95ysn4nRg1 parent b65030b commit 52ce518
1 file changed
Lines changed: 30 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
| |||
52 | 58 | | |
53 | 59 | | |
54 | 60 | | |
55 | | - | |
56 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
57 | 69 | | |
58 | 70 | | |
59 | 71 | | |
| |||
65 | 77 | | |
66 | 78 | | |
67 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
68 | 96 | | |
69 | 97 | | |
70 | 98 | | |
| |||
0 commit comments