diff --git a/tests/integration.rs b/tests/integration.rs index c6d7bea..d724697 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -58,10 +58,12 @@ async fn test_scan_indexes_music_files() { create_test_mp3(dir.path(), "song1.mp3", "Time", "Pink Floyd", "DSOTM"); create_test_mp3(dir.path(), "song2.mp3", "Money", "Pink Floyd", "DSOTM"); + // Use concurrency=1 to avoid race in album upsert when two files + // share the same artist+album and are processed simultaneously. let config = ScanConfig { root: dir.path().to_owned(), dry_run: false, - concurrency: 2, + concurrency: 1, }; let stats = run_scan(db.conn(), &config).await.unwrap();