Fixed BackgroundInstallControlServiceTest flaky case.
The test case relied on consecutive calls of System.currentTimeMillis() and SystemClock.uptimeMillis() with the difference be at most 1msec. Which is not a practical time window for consistency. Adding a large buffer instead. Test: atest FrameworksServicesTests:com.android.server.pm.BackgroundInstallControlServiceTest#testHandleUsageEvent_fallsBackToAppInfoTimeWhenHistoricalSessionsNotFound --iterations 10 Bug: 326107161 Change-Id: I4d46f9500ffa553d83a324ebac11b4d259ee852f
Loading
Please register or sign in to comment