address review: mark the fetch bound test-only; fix the concurrency test

- The concurrency bound already existed; this parameter only exists so tests
  can force the sequential path, and no production path passes it. Mark it
  `@VisibleForTesting` so that is explicit rather than reading as a wired
  setting.
- `playlistSongsUseTheSameRowsAtAnyFetchBound` could not fail (bound has no
  effect on the rows) — delete it and its `normalized` helper.
- `playlistSongsRespectsASmallerFetchBound` relied on a 300ms overlap
  window; use latches so the bound is proven deterministically (fails when
  the semaphore ignores the bound).
This commit is contained in:
austinried
2026-10-04 00:30:01 +00:00
parent dd092ed7ad
commit adcdc442e4
2 changed files with 19 additions and 31 deletions
@@ -1,5 +1,6 @@
package com.subtracks.data.source.subsonic
import androidx.annotation.VisibleForTesting
import com.subtracks.data.model.Album
import com.subtracks.data.model.Artist
import com.subtracks.data.model.Playlist
@@ -34,6 +35,7 @@ class SubsonicSource(
private val maxBitrate: Int = 0,
private val streamFormat: String? = null,
private val maxPages: Int = MAX_PAGES,
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
private val maxConcurrentFetches: Int = MAX_CONCURRENT_FETCHES,
) : MusicSource {
private var emptyQuerySearchSupported: Boolean? = null