Simplify ApexE2EBaseHostTest
* Instead of waiting for 10 seconds, poll for session to become ready
every 200ms with TTL of 10s.
* Add logging to have better understanding how long does it take for
session to become ready.
* Use adb uninstall instead of brutally wiping out /data/apex.
* Don't reboot a device in case uninstall of apex failed: this
means that most likely apex wasn't installed in the first place, so
there is no need in rebooting.
I did some measurements, with this CL:
testStageActivatUninstallTwice: ~4m40
testStageActivateUninstallApexPackage: ~3m
All numbers are approximate average over 5 runs on the
aosp_cf_x86_phone-eng.
There are several more optimizations that we can probably make:
1. Wait for the session ready broadcast in the
PackageManagerShellCommand.
2. In apexd, when uninstalling an apex that is not referenced by any
process, simply deactivate it without requiring a reboot.
Bug: 124582823
Test: apex_e2e_tests
Change-Id: Ia4024e7a9c49b2613a4f1e62da8dd834b26cb776
Merged-In: Ia4024e7a9c49b2613a4f1e62da8dd834b26cb776
(cherry picked from commit 2367685e55bad48ea58605c9edbac682200f8eb9)
1 file changed