summaryrefslogtreecommitdiff
path: root/common/networkstackclient
diff options
context:
space:
mode:
authorJunyu Lai <junyulai@google.com>2020-05-05 04:10:53 +0000
committerJunyu Lai <junyulai@google.com>2020-05-05 10:19:55 +0000
commitaa2d8a3af4df361fe60560b1a50990d37dbfa817 (patch)
tree665b65d23c03ddf1dc04d9ed65482d3573dad4ae /common/networkstackclient
parentcf37ca43cbb6c7fe37f7854a26eb02c260598575 (diff)
[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 Merged-In: I2edf887ccee5f205368a294f5f9990edb818332d (cherry picked from commit bdd1690cef97c246405b43ec0d9ccea1ede5703b)
Diffstat (limited to 'common/networkstackclient')
0 files changed, 0 insertions, 0 deletions