Skip to content

Fix flaky media seek test (forward playback drift on JFX 25)#117

Merged
FlorianKirmaier merged 2 commits into
mainfrom
fix/media-seek-playing-drift
Jun 14, 2026
Merged

Fix flaky media seek test (forward playback drift on JFX 25)#117
FlorianKirmaier merged 2 commits into
mainfrom
fix/media-seek-playing-drift

Conversation

@FlorianKirmaier

Copy link
Copy Markdown
Contributor

MediaPlayerTests.seek_after_media_player_reached_eom seeks to duration - 2s while playing, so getCurrentTime() drifts forward past the seek target during waitForFxEvents() (134 ms observed on JFX 25, vs ≤50 ms on JFX 17). The existing symmetric within(50 ms) tolerance from #110 then fails intermittently.

This swaps that one assertion for a forward-tolerant range ([seekTime − 50 ms, seekTime + 1 s]) since a playing seek lands at the target and only advances forward. The three ready/paused seek assertions keep the exact-closeness check unchanged.

🤖 Generated with Claude Code

FlorianKirmaier and others added 2 commits June 14, 2026 23:47
seek_after_media_player_reached_eom seeks while playing, so current time
drifts forward past the target during the wait. Assert a forward-tolerant
range for that case instead of symmetric closeness.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
JavaFX 21+ converts the seek Duration to CMTime with timescale 1 on macOS,
so seeks snap ~0.5s off (exact on JFX 17). The seek-based tests can't pass
there until fixed upstream. CI runs media tests on ubuntu only.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@FlorianKirmaier FlorianKirmaier merged commit 7cd7f99 into main Jun 14, 2026
2 checks passed
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