mirror of
https://github.com/navidrome/navidrome.git
synced 2026-04-28 11:29:38 +00:00
fix: prevent data race on conf.Server during cleanup in e2e tests
Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
parent
62f9c3a458
commit
e05a7e230f
1 changed files with 5 additions and 0 deletions
|
|
@ -318,6 +318,11 @@ func setupTestDB() {
|
|||
ctx = request.WithUser(GinkgoT().Context(), adminUser)
|
||||
|
||||
DeferCleanup(configtest.SetupConfig())
|
||||
DeferCleanup(func() {
|
||||
// Wait for any background scan (e.g. from startScan endpoint) to finish
|
||||
// before config cleanup runs, to avoid a data race on conf.Server.
|
||||
Eventually(scanner.IsScanning).Should(BeFalse())
|
||||
})
|
||||
conf.Server.MusicFolder = "fake:///music"
|
||||
conf.Server.DevExternalScanner = false
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue