Test flow: * Install app A with rollback enabled * Wait half of the expiration time * Install app B with rollback enabled * Move time forward by expiration time * Wait half of the expiration time - At this point, an expiration check should run and expire app A but not app B * Assert app A rollback is expired * Assert app B rollback is not expired * Wait half of the expiration time * Assert app B rollback is expired Note: installing app A before app B is done solely to schedule an expiration check before app B rollback has expired Test: atest RollbackTest#testTimeChangeDoesNotAffectLifetime Test: run the same test without the registering the time change handler in RollbackManagerServiceImpl - test fails Bug: 124095332 Change-Id: I4bc2d449e4195e059fa43e7568783683a60e2197
This directory contains a test for the rollback manager service. Directory structure =================== RollbackTest - device driven test for rollbacks not involving staged rollbacks. StagedRollbackTest - device driven test for staged rollbacks. TestApp - source for dummy apks used in testing. TestApex - source for dummy apex modules used in testing. Running the tests ================= You can manually run the tests as follows: atest RollbackTest atest StagedRollbackTest