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

Commit a226e6a6 authored by Alina Zaidi's avatar Alina Zaidi
Browse files

Reset mocks after DesktopModeEventLoggerTest test cases in an attempt to

bring down flakiness

Bug: 378158465
Flag: EXEMPT changes test
Test: atest com.android.wm.shell.desktopmode.DesktopModeEventLoggerTest --rerun-until-failure 100
Change-Id: Ic3a0ecfc6910dc27d517cd9796c5d8fec8502401
parent b4d1ca9e
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ import com.android.wm.shell.desktopmode.DesktopModeEventLogger.Companion.UNSET_M
import com.android.wm.shell.desktopmode.DesktopModeEventLogger.Companion.UNSET_UNMINIMIZE_REASON
import com.android.wm.shell.desktopmode.DesktopModeEventLogger.Companion.UnminimizeReason
import com.google.common.truth.Truth.assertThat
import org.junit.After
import org.junit.Before
import org.junit.Rule
import org.junit.Test
@@ -79,6 +80,12 @@ class DesktopModeEventLoggerTest : ShellTestCase() {
        doReturn(DISPLAY_HEIGHT).whenever(displayLayout).height()
    }

    @After
    fun tearDown() {
        clearInvocations(staticMockMarker(FrameworkStatsLog::class.java))
        clearInvocations(staticMockMarker(EventLogTags::class.java))
    }

    @Test
    fun logSessionEnter_logsEnterReasonWithNewSessionId() {
        desktopModeEventLogger.logSessionEnter(EnterReason.KEYBOARD_SHORTCUT_ENTER)