Skip to content
Commit efc0db38 authored by Hai Zhang's avatar Hai Zhang
Browse files

Fix AppOpsServiceTest flakiness.

AppOpsServiceTest creates multiple instances of AppOpsService, and
they write to the same file asynchronously, which may result in a
previous method overwriting the file being used by the current
method.

This change calls shutdown() after each test method, and removes any
pending write runnable from the handler. It also removes unnecessary
calls to readState() because state is always read in AppOpsService
constructor.

Fixes: 160785982
Test: atest AppOpsServiceTest
Change-Id: If792b61e5cae1d15601a18ef9cb0f71bc79d3d05
parent 9999b20e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment