Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c09d291c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Remove flakey test" into rvc-dev am: 8c703e4d am: b678ff90

Change-Id: I818931f53c0198f9a5d2cddb054e31ca000a0a02
parents 161e7a5b b678ff90
Loading
Loading
Loading
Loading
+0 −20
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package com.android.systemui.media

import android.graphics.Color
import android.media.MediaMetadata
import android.media.session.MediaController
import android.media.session.PlaybackState
@@ -354,25 +353,6 @@ public class SeekBarViewModelTest : SysuiTestCase() {
        assertThat(fakeExecutor.numPending()).isEqualTo(1)
    }

    @Test
    fun taskUpdatesProgress() {
        // GIVEN that the PlaybackState contins the initial position
        val initialPosition = 0L
        val state = PlaybackState.Builder().run {
            setState(PlaybackState.STATE_PLAYING, initialPosition, 1f)
            build()
        }
        whenever(mockController.getPlaybackState()).thenReturn(state)
        viewModel.updateController(mockController)
        // WHEN the task runs
        with(fakeExecutor) {
            advanceClockToNext()
            runAllReady()
        }
        // THEN elapsed time has increased
        assertThat(viewModel.progress.value!!.elapsedTime).isGreaterThan(initialPosition.toInt())
    }

    @Test
    fun startListeningQueuesPollTask() {
        // GIVEN not listening