46eae8a765d7ffc60fabb76812ccc26dde25e6cf
Currently testStackedLinkProperties accounts for some of the NetworkCallbacks that are fired, but not all of them. The test passes because it only ever expects LinkProperties changed callbacks (and not, e.g., lost callbacks), because it uses waitForIdle(), and because at the end, when the callback is unregistered, it does not call assertNoCallback(). Add the missing callback expectation and expect a LOST callback at the end. Also add an assertNoCallback, even though it's not strictly necessary. Remove all the waitForIdle statements, which are no longer necessary because every assertion happens after waiting for a callback. Making the expectations more precise in a separate CL will help ensure that upcoming changes to this code don't break anything, and will make said changes easier to review. Bug: 65674744 Test: atest FrameworksNetTests Test: ConnectivityServiceTest#testStackedLinkProperties passes 400 times Change-Id: I73cda0dd029a0e6546f7272beedf841ce5a4c0dc
Description
android_packages_modules_Connectivity
Languages
Java
81.4%
Kotlin
7.7%
AIDL
4.5%
C++
4.5%
C
1.7%
Other
0.1%