mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-08 02:17:25 +02:00
The three It blocks that build a tight-cap streamer each spawned a fresh transcoding cache without waiting for its background initialization. The init goroutine reads conf.Server.CacheFolder, which races against SnapshotConfig's pointer-swap restore (Server = &restored) fired by DeferCleanup at the end of the spec. CI tripped the race under -shuffle=on -race; locally it reproduced about 10% of the time. Wait for tightCache.Available() before constructing the streamer, mirroring the outer BeforeEach. For the slot-saturation spec, swap in a blocking io.Pipe-backed mock ffmpeg so the cache's background copyAndClose can't drain the source and release the slot — the previous behavior happened to work only because the cache wasn't yet available and the no-cache path was exercised. |
||
|---|---|---|
| .. | ||
| aliases.go | ||
| aliases_test.go | ||
| codec.go | ||
| codec_test.go | ||
| decider.go | ||
| decider_test.go | ||
| legacy_client.go | ||
| legacy_client_test.go | ||
| limitations.go | ||
| limiter.go | ||
| limiter_test.go | ||
| media_streamer.go | ||
| media_streamer_test.go | ||
| stream_suite_test.go | ||
| token.go | ||
| token_test.go | ||
| types.go | ||