File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
pillarbox-player/src/test/java/ch/srgssr/pillarbox/player Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 11[versions ]
22accompanist = " 0.34.0"
33android-desugar-jdk-libs = " 2.0.4"
4- android-gradle-plugin = " 8.4.1 "
4+ android-gradle-plugin = " 8.4.2 "
55androidx-activity = " 1.9.0"
66androidx-annotation = " 1.8.0"
77androidx-compose = " 2024.05.00"
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import kotlin.test.AfterTest
2121import kotlin.test.BeforeTest
2222import kotlin.test.Test
2323import kotlin.test.assertEquals
24+ import kotlin.test.assertTrue
2425import kotlin.time.Duration.Companion.milliseconds
2526
2627@RunWith(AndroidJUnit4 ::class )
@@ -177,7 +178,9 @@ class PlayerCallbackFlowTest {
177178 TestPlayerRunHelper .runUntilPlaybackState(player, Player .STATE_READY )
178179
179180 player.getCurrentDefaultPositionAsFlow().test {
180- assertEquals(6L , awaitItem().milliseconds.inWholeHours)
181+ val currentDefaultPositionInHours = awaitItem().milliseconds.inWholeHours
182+
183+ assertTrue(currentDefaultPositionInHours in 5 .. 6 )
181184 ensureAllEventsConsumed()
182185 }
183186 }
You can’t perform that action at this time.
0 commit comments