(t *testing.T)
| 212 | } |
| 213 | |
| 214 | func TestAddAddition_AfterCancel(t *testing.T) { |
| 215 | ctx, cancel := context.WithCancel(context.Background()) |
| 216 | pool := newTestBasePool(ctx, cancel) |
| 217 | cancel() |
| 218 | |
| 219 | pool.addAddition(&Unit{path: "/a", source: parsers.WordSource}) |
| 220 | |
| 221 | select { |
| 222 | case <-pool.additionCh: |
| 223 | t.Fatal("should not send after cancel") |
| 224 | default: |
| 225 | } |
| 226 | // wg must be zero — the cancelled path must not leak a counter |
| 227 | pool.wg.Wait() |
| 228 | } |
| 229 | |
| 230 | func withStatusFilters(t *testing.T) { |
| 231 | t.Helper() |
nothing calls this directly
no test coverage detected