Skip to content

fix(test): de-flake VoiceRecorderTest concurrent-start cleanup#47

Merged
momentmaker merged 1 commit intomainfrom
fix/voicerecorder-test-flake-concurrent-stop
Apr 25, 2026
Merged

fix(test): de-flake VoiceRecorderTest concurrent-start cleanup#47
momentmaker merged 1 commit intomainfrom
fix/voicerecorder-test-flake-concurrent-stop

Conversation

@momentmaker
Copy link
Copy Markdown
Member

Summary

Test plan

🤖 Generated with Claude Code

…rderTest

The `second start returns ConcurrentRecording without touching first`
test was racing on slow CI runners: the cleanup `recorder.stop()`
sometimes ran before the capture loop wrote its first buffer, so stop
returned `EmptyRecording` and the assertion's `.getOrThrow()` blew up.
Mirror the pattern from sibling tests by inserting
`waitForCaptureProgress()` between the second-start assertion and the
final stop.

Surfaced as the flaky failure on dependabot PRs #31 (Hilt 1.2→1.3) and
#34 (Robolectric 4.14→4.16). Both runs were unrelated to the test —
their CI runners just happened to schedule the capture thread late.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@momentmaker momentmaker merged commit 039e137 into main Apr 25, 2026
1 check passed
@momentmaker momentmaker deleted the fix/voicerecorder-test-flake-concurrent-stop branch April 25, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant