Merge "Improve flakiness of PlatformCompatGating test"
This commit is contained in:
@@ -131,6 +131,10 @@ class PlatformCompatCommandNotInstalledTest {
|
|||||||
assertThat(platformCompat.isChangeEnabled(TEST_CHANGE_ID, appInfo)).isEqualTo(params.result)
|
assertThat(platformCompat.isChangeEnabled(TEST_CHANGE_ID, appInfo)).isEqualTo(params.result)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun command(command: String) =
|
private fun command(command: String): String {
|
||||||
FileReader(uiAutomation.executeShellCommand(command).fileDescriptor).readText()
|
val fileDescriptor = uiAutomation.executeShellCommand(command)
|
||||||
|
return String(ParcelFileDescriptor.AutoCloseInputStream(fileDescriptor).use {
|
||||||
|
inputStream -> inputStream.readBytes()
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user