Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: use runUntilPendingCommandsAreFullyHandled in CommandersActTrackerIntegrationTest #598

Merged
merged 2 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class CommandersActTrackerIntegrationTest {
player.playWhenReady = true

TestPlayerRunHelper.runUntilPlaybackState(player, Player.STATE_READY)
TestPlayerRunHelper.playUntilStartOfMediaItem(player, 0)
TestPlayerRunHelper.runUntilPendingCommandsAreFullyHandled(player)

player.setMediaItem(SRGMediaItemBuilder(URN_NOT_LIVE_VIDEO).build())
player.playWhenReady = true
Expand Down Expand Up @@ -214,7 +214,7 @@ class CommandersActTrackerIntegrationTest {
player.playWhenReady = true

TestPlayerRunHelper.runUntilPlaybackState(player, Player.STATE_READY)
TestPlayerRunHelper.playUntilStartOfMediaItem(player, 0)
TestPlayerRunHelper.runUntilPendingCommandsAreFullyHandled(player)

verifyOrder {
commandersAct.enableRunningInBackground()
Expand All @@ -239,7 +239,7 @@ class CommandersActTrackerIntegrationTest {
player.setPlaybackSpeed(2f)

TestPlayerRunHelper.runUntilPlaybackState(player, Player.STATE_READY)
TestPlayerRunHelper.playUntilStartOfMediaItem(player, 0)
TestPlayerRunHelper.runUntilPendingCommandsAreFullyHandled(player)

verifyOrder {
commandersAct.enableRunningInBackground()
Expand All @@ -263,7 +263,7 @@ class CommandersActTrackerIntegrationTest {
player.playWhenReady = true

TestPlayerRunHelper.runUntilPlaybackState(player, Player.STATE_READY)
TestPlayerRunHelper.playUntilStartOfMediaItem(player, 0)
TestPlayerRunHelper.runUntilPendingCommandsAreFullyHandled(player)

clock.advanceTime(5.minutes.inWholeMilliseconds)
player.setPlaybackSpeed(2f)
Expand Down Expand Up @@ -292,7 +292,7 @@ class CommandersActTrackerIntegrationTest {
player.playWhenReady = true

TestPlayerRunHelper.runUntilPlaybackState(player, Player.STATE_READY)
TestPlayerRunHelper.playUntilStartOfMediaItem(player, 0)
TestPlayerRunHelper.runUntilPendingCommandsAreFullyHandled(player)

clock.advanceTime(2.minutes.inWholeMilliseconds)
player.playWhenReady = false
Expand Down Expand Up @@ -327,7 +327,7 @@ class CommandersActTrackerIntegrationTest {
player.playWhenReady = true

TestPlayerRunHelper.runUntilPlaybackState(player, Player.STATE_READY)
TestPlayerRunHelper.playUntilStartOfMediaItem(player, 0)
TestPlayerRunHelper.runUntilPendingCommandsAreFullyHandled(player)

clock.advanceTime(2.minutes.inWholeMilliseconds)
player.playWhenReady = false
Expand Down Expand Up @@ -373,7 +373,7 @@ class CommandersActTrackerIntegrationTest {
player.playWhenReady = true

TestPlayerRunHelper.runUntilPlaybackState(player, Player.STATE_READY)
TestPlayerRunHelper.playUntilStartOfMediaItem(player, 0)
TestPlayerRunHelper.runUntilPendingCommandsAreFullyHandled(player)

clock.advanceTime(2.minutes.inWholeMilliseconds)
player.stop()
Expand Down Expand Up @@ -621,7 +621,7 @@ class CommandersActTrackerIntegrationTest {
player.playWhenReady = true

TestPlayerRunHelper.runUntilPlaybackState(player, Player.STATE_READY)
TestPlayerRunHelper.playUntilStartOfMediaItem(player, 0)
TestPlayerRunHelper.runUntilPendingCommandsAreFullyHandled(player)

clock.advanceTime(playTime.inWholeMilliseconds)
advanceTimeBy(playTime)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,6 @@ class ComScoreTrackerIntegrationTest {
}

@Test
@Ignore("Need a live DVR available outside of Switzerland")
fun `live - player prepared, playing and seeking`() {
player.setMediaItem(SRGMediaItemBuilder(URN_LIVE_VIDEO).build())
player.prepare()
Expand Down Expand Up @@ -391,7 +390,6 @@ class ComScoreTrackerIntegrationTest {
}

@Test
@Ignore("Need a live DVR available outside of Switzerland")
fun `live - player prepared and seek`() {
player.setMediaItem(SRGMediaItemBuilder(URN_LIVE_VIDEO).build())
player.prepare()
Expand Down
Loading