Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 46f285fa authored by junyulai's avatar junyulai
Browse files

[SP18.2] Create TestableNetworkStatsProviderCbBinder

Currently, in OffloadController unit test, mock object is used
to verify callback sent from provider. However, verify a mock
method running in different thread, is not supported if there
is no additional thread synchronization mechanism applied.

This is fine now since all the callbacks fired from
OffloadControllerTest are on the same thread with caller.
But it is not necessary true in subsequent patches that fire
callbacks from handler thread.

Hence, introduce a testable provider callback that based on
a thread-safe ArrayTrackRecord to provide the functionality
to verify mock callback fired in a different thread.

Test: m -j
Bug: 149467454
Change-Id: I2edf887ccee5f205368a294f5f9990edb818332d
parent 9f2fc0a8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment