Skip to content

Commit

Permalink
Fix: use runUntilPendingCommandsAreFullyHandled in `CommandersActTr…
Browse files Browse the repository at this point in the history
…ackerIntegrationTest` (#603)
  • Loading branch information
MGaetan89 authored Jun 25, 2024
1 parent b58b644 commit 778e487
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
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

0 comments on commit 778e487

Please sign in to comment.