Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Provider tests wait on PagedFlow's real-time retry backoff (~40 s per iOS run)

Open
#1,071 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
68/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
kotlin
Domain
testing

Research direction

Start with PagedFlow.kt lines 35-36 for the retry constants and the delay(wait) call at line 63, then read PagedFlowTest, which already uses runTest. The slow collectors are in PlexMediaProviderTest.kt near line 562 and the Emby (~664) and Jellyfin (~668) test helpers, which use runBlocking { toList() }. Run iosSimulatorArm64Test first to get a baseline timing. Done means these tests run on virtual time, the total drops well below 40 s, and Plex's real-I/O cases still pass.

Written by the indexing model from the issue text.

Description

later

Provider tests pay the PagedFlow retry delay on the real clock: about 40 s per iOS provider test run.

  • android/mediaprovider/server/src/commonMain/.../PagedFlow.kt:35-36 sets MAX_ATTEMPTS=3 and BACKOFF_BASE_MS=1_000L, and delay(wait) runs at :63.
  • PlexMediaProviderTest.kt:562, and the matching helpers in the Emby (:664) and Jellyfin (:668) tests, collect the flow under runBlocking { toList() }, so the delays happen in real time.
  • Measured on iosSimulatorArm64Test: PlexMediaProviderTest takes 24.6 s over 38 tests, and Emby and Jellyfin take 7.8 s and 7.5 s. The slow cases are the 3-4.6 s failure-path tests.

Fix: collect under runTest so delay runs on virtual time (PagedFlowTest already does this), or inject the backoff. Check that Plex's real-I/O paths still work under runTest.

Found by the codehealth measured-report experiment.

Dominant language
Kotlin
Stars
231
Forks
28
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from timusus/Shuttle2

All issues in timusus/Shuttle2

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.