Commit b2e660f
fix: Fix cancellation handling in channel processor test
The test ProcessWithChannel_WithCancellation_ShouldCancelGracefully was failing
because cancellation could occur before any items were written to the channel.
Changes:
- Added TaskCompletionSource to signal when processing starts
- Wait for processing to begin before triggering cancellation
- Reduced cancellation delay from 200ms to 50ms after processing starts
This ensures at least some items are processed before cancellation, making
the test behavior more predictable and reliable.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent bfe0bb2 commit b2e660f
1 file changed
Lines changed: 10 additions & 2 deletions
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
162 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
163 | 170 | | |
164 | 171 | | |
165 | 172 | | |
| |||
173 | 180 | | |
174 | 181 | | |
175 | 182 | | |
176 | | - | |
| 183 | + | |
177 | 184 | | |
178 | 185 | | |
179 | | - | |
| 186 | + | |
| 187 | + | |
180 | 188 | | |
181 | 189 | | |
182 | 190 | | |
| |||
0 commit comments