diff --git a/pillarbox-player/src/test/java/ch/srgssr/pillarbox/player/tracker/MediaItemTrackerTest.kt b/pillarbox-player/src/test/java/ch/srgssr/pillarbox/player/tracker/MediaItemTrackerTest.kt index 07f853ff0..3b6818c7a 100644 --- a/pillarbox-player/src/test/java/ch/srgssr/pillarbox/player/tracker/MediaItemTrackerTest.kt +++ b/pillarbox-player/src/test/java/ch/srgssr/pillarbox/player/tracker/MediaItemTrackerTest.kt @@ -571,15 +571,9 @@ class MediaItemTrackerTest { } TestPlayerRunHelper.runUntilPlaybackState(player, Player.STATE_READY) - // player.seekTo(8_000) // Near the end of the media - runUntilMediaItemTransition(player) - // Wait second item is playing - val waitToPosition = player.currentPosition + 1000 - RobolectricUtil.runMainLooperUntil { - player.currentPosition >= waitToPosition - } + TestPlayerRunHelper.runUntilTimelineChanged(player) - verifyAll { + verifyOrder { fakeMediaItemTracker.start(any(), FakeMediaItemTracker.Data(firstMediaId)) fakeMediaItemTracker.stop(any(), MediaItemTracker.StopReason.EoF, any()) fakeMediaItemTracker.start(any(), FakeMediaItemTracker.Data(secondMediaId))