From b77d12bbf1e5b49140ba129a8043dd98a68d8fe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaquim=20St=C3=A4hli?= Date: Mon, 12 Feb 2024 14:42:59 +0100 Subject: [PATCH] Fix test --- .../pillarbox/player/tracker/MediaItemTrackerTest.kt | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) 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))