Commit c699da2
authored
test: fix flaky test cache filter (#4238)
```
time="2026-09-02T07:55:01Z" level=warning msg="cache: background revalidation fetch failed" error="no fetch stub set" url="http://localhost:9090/spaces/abc/entries/swr"
panic: close of closed channel
runtime/debug.Stack()
/opt/hostedtoolcache/go/1.27.0/x64/src/runtime/debug/stack.go:26 +0x67
golang.org/x/sync/singleflight.newPanicError({0x4468158, 0x2fedca0})
/home/runner/go/pkg/mod/golang.org/x/sync@v0.22.0/singleflight/singleflight.go:44 +0x2b
golang.org/x/sync/singleflight.(*Group).doCall.func2.1()
/home/runner/go/pkg/mod/golang.org/x/sync@v0.22.0/singleflight/singleflight.go:193 +0x51
panic({0x4468158?, 0x2fedca0?})
/opt/hostedtoolcache/go/1.27.0/x64/src/runtime/panic.go:859 +0x125
github.com/zalando/skipper/filters/cache.TestCacheFilter_ColdMissCoalescing.func1(0xc0005d4900?)
/home/runner/work/skipper/skipper/filters/cache/filter_test.go:403 +0x6f
github.com/zalando/skipper/filters/cache.(*cacheFilter).coalesce.func1()
/home/runner/work/skipper/skipper/filters/cache/filter.go:488 +0x1f5
golang.org/x/sync/singleflight.(*Group).doCall.func2(0xc00058df07, 0xc0005d9770, 0xc000351a40)
/home/runner/go/pkg/mod/golang.org/x/sync@v0.22.0/singleflight/singleflight.go:198 +0xaa
golang.org/x/sync/singleflight.(*Group).doCall(0xc000258368, 0xc0005d9770, {0xc000371000, 0x40}, 0xc000351a40)
/home/runner/go/pkg/mod/golang.org/x/sync@v0.22.0/singleflight/singleflight.go:200 +0x132
created by golang.org/x/sync/singleflight.(*Group).DoChan in goroutine 154
/home/runner/go/pkg/mod/golang.org/x/sync@v0.22.0/singleflight/singleflight.go:138 +0x55d
goroutine 181 [running]:
golang.org/x/sync/singleflight.(*Group).doCall.func1.gowrap2()
/home/runner/go/pkg/mod/golang.org/x/sync@v0.22.0/singleflight/singleflight.go:167 +0x39
created by golang.org/x/sync/singleflight.(*Group).doCall.func1 in goroutine 180
/home/runner/go/pkg/mod/golang.org/x/sync@v0.22.0/singleflight/singleflight.go:167 +0x4b3
FAIL github.com/zalando/skipper/filters/cache 0.209s
```
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>1 parent 0d0ac17 commit c699da2
1 file changed
Lines changed: 11 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
385 | | - | |
| 385 | + | |
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
| |||
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
397 | | - | |
| 397 | + | |
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
| 401 | + | |
401 | 402 | | |
402 | | - | |
403 | | - | |
404 | | - | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
405 | 406 | | |
406 | 407 | | |
407 | 408 | | |
| |||
414 | 415 | | |
415 | 416 | | |
416 | 417 | | |
417 | | - | |
| 418 | + | |
418 | 419 | | |
419 | 420 | | |
420 | 421 | | |
| |||
429 | 430 | | |
430 | 431 | | |
431 | 432 | | |
432 | | - | |
433 | | - | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
434 | 437 | | |
435 | 438 | | |
436 | 439 | | |
| |||
0 commit comments