android_packages_modules_Co.../tests/net/java/com/android/server
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hugo Benichi 2a84d1cbcf ConnectivityServiceTest: fix flaky testNetworkRequestMaximum
Registered requests are not keyed by PendingIntents in
ConnectivityService, which means that unregistering a request with a
PendingIntent causes a linear search in all registered requests.

testNetworkRequestMaximum was registering too many PendingIntents
simultaneously, causing the unregistration loop to have n^2
complexity and to take a long time to take effect.

To make the unregistering loop less likely to trigger a timeout on
waitForIdle, this patch changes the test to not register MAX_REQUEST
number of PendingIntent, but instead mixes a small number of
PendingIntents with NetworkCallbacks to reach MAX_REQUEST number of
simultaneously registered requests.

When unregistering these requests, callbacks are unregistered first.

Bug: 32561414
Test: runtest frameworks-net
Change-Id: I48b882c884abe20b388190b7f28baee293446f37
2017-10-02 17:37:57 +09:00
..
connectivity Delete the legacy framework code for manipulating ND offload. 2017-09-27 16:47:36 +09:00
net Add tether offload traffic to interface stats as well. 2017-08-19 10:12:05 +09:00
ConnectivityServiceTest.java ConnectivityServiceTest: fix flaky testNetworkRequestMaximum 2017-10-02 17:37:57 +09:00
IpSecServiceTest.java Add unit test for IpSecService 2017-07-20 04:26:24 +00:00
NetworkManagementServiceTest.java Make NetworkManagementServiceTest pass again. 2017-08-23 09:49:05 +09:00
NsdServiceTest.java Fix NPE in NsdServiceTest 2017-09-28 15:22:13 +09:00