From d860d92b9e99dda03de8645744eb1f413a78fcb8 Mon Sep 17 00:00:00 2001 From: Jorge Antonio Diaz-Benito Soriano Date: Tue, 2 Jul 2024 13:37:43 +0200 Subject: [PATCH] Fix return types This makes the IDE complain, which is annoying when looking at actual problems. --- .../playbackengine/ExoPlayerPlaybackEngineTest.kt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/player/playback-engine/src/test/kotlin/com/tidal/sdk/player/playbackengine/ExoPlayerPlaybackEngineTest.kt b/player/playback-engine/src/test/kotlin/com/tidal/sdk/player/playbackengine/ExoPlayerPlaybackEngineTest.kt index 17c935ed..34208f7f 100644 --- a/player/playback-engine/src/test/kotlin/com/tidal/sdk/player/playbackengine/ExoPlayerPlaybackEngineTest.kt +++ b/player/playback-engine/src/test/kotlin/com/tidal/sdk/player/playbackengine/ExoPlayerPlaybackEngineTest.kt @@ -274,8 +274,15 @@ internal class ExoPlayerPlaybackEngineTest { } @Test - fun loadShouldSetCorrectPropertiesAndPreparePlayerWithCorrectMediaSource() = runBlocking { - playbackEngine.load(forwardingMediaProduct.delegate) + fun loadShouldSetCorrectPropertiesAndPreparePlayerWithCorrectMediaSource() { + runBlocking { + withTimeout(8.seconds) { + playbackEngine.events.filter { it is Event.MediaProductTransition }.first() + } + launch { + playbackEngine.load(forwardingMediaProduct.delegate) + } + } assertThat(playbackEngine.mediaProduct).isEqualTo(forwardingMediaProduct.delegate) assertThat(playbackEngine.testNextMediaSource).isEqualTo(null) @@ -287,7 +294,7 @@ internal class ExoPlayerPlaybackEngineTest { } @Test - fun nextShouldDoNothingIfPlaybackStateIsIdle() = runBlocking { + fun nextShouldDoNothingIfPlaybackStateIsIdle() { playbackEngine.setNext(forwardingMediaProduct.delegate) verify(initialExtendedExoPlayer, never())