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

Commit d500b8af authored by Andrei-Valentin Onea's avatar Andrei-Valentin Onea Committed by Gerrit Code Review
Browse files

Merge "Improve flakiness of PlatformCompatGating test"

parents cc0ece41 c202da86
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -131,6 +131,10 @@ class PlatformCompatCommandNotInstalledTest {
        assertThat(platformCompat.isChangeEnabled(TEST_CHANGE_ID, appInfo)).isEqualTo(params.result)
    }

    private fun command(command: String) =
            FileReader(uiAutomation.executeShellCommand(command).fileDescriptor).readText()
    private fun command(command: String): String {
        val fileDescriptor = uiAutomation.executeShellCommand(command)
        return String(ParcelFileDescriptor.AutoCloseInputStream(fileDescriptor).use {
            inputStream -> inputStream.readBytes()
        })
    }
}