Skip to content

Commit

Permalink
Remove RepeatableFlakyTest
Browse files Browse the repository at this point in the history
These tests are no longer flaky when it comes to asserting before reporting has
finished, so the repeat mechanism is no longer required in that sense.

If the timeout for playback proves to be a problem, then that should be bumped
instead, as it is virtually higher for other tests (they use the same timeout
for playback completion, even though said playback is not full).
  • Loading branch information
stoyicker committed Aug 5, 2024
1 parent af24fca commit 8cdb20f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 92 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ import com.tidal.sdk.player.events.playlogtest.PlayLogTestDefaultEventReporterCo
import com.tidal.sdk.player.events.reflectionComponentFactoryF
import com.tidal.sdk.player.playbackengine.model.Event
import com.tidal.sdk.player.playbackengine.model.Event.MediaProductEnded
import com.tidal.sdk.player.repeatableflakytest.RepeatableFlakyTest
import com.tidal.sdk.player.repeatableflakytest.RepeatableFlakyTestRule
import com.tidal.sdk.player.setBodyFromFile
import kotlin.time.Duration.Companion.milliseconds
import kotlin.time.Duration.Companion.seconds
Expand Down Expand Up @@ -68,9 +66,6 @@ class PlayLogTest {
@get:Rule
val server = MockWebServer()

@get:Rule
val repeatableFlakyTestRule = RepeatableFlakyTestRule()

private val eventReporterCoroutineScope =
TestScope(StandardTestDispatcher(TestCoroutineScheduler()))
private val responseDispatcher = PlayLogTestMockWebServerDispatcher(server)
Expand Down Expand Up @@ -147,22 +142,18 @@ class PlayLogTest {
verifyNoMoreInteractions(eventSender)
}

@RepeatableFlakyTest // Playback may take longer in practice than it should in theory
@Test
fun loadAndPlayUntilEndNoNulls() =
loadAndPlayUntilEnd(MediaProduct(ProductType.TRACK, "1", "TESTA", "456"))

@RepeatableFlakyTest // Playback may take longer in practice than it should in theory
@Test
fun loadAndPlayUntilEndNullSourceType() =
loadAndPlayUntilEnd(MediaProduct(ProductType.TRACK, "1", null, "789"))

@RepeatableFlakyTest // Playback may take longer in practice than it should in theory
@Test
fun loadAndPlayUntilEndNullSourceId() =
loadAndPlayUntilEnd(MediaProduct(ProductType.TRACK, "1", "TESTB", null))

@RepeatableFlakyTest // Playback may take longer in practice than it should in theory
@Test
fun loadAndPlayUntilEndNullSourceTypeNullSourceId() =
loadAndPlayUntilEnd(MediaProduct(ProductType.TRACK, "1", null, null))
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 8cdb20f

Please sign in to comment.