Junyu Lai
17f589cf47
Ensure no thread leak after NetworkStatsServiceTest
This change includes:
1. A mechanism in DevSdkIngoreRunnrer to dump thread counts
before/after tests, and compare thread counts to detect leaks.
2. Add an annotation @MonitorThreadLeak for test classes to
annotate the classes which should monitor thread leaks.
3. Annotated NetworkStatsServiceTest to apply the enforcement.
Sample output:
[1/2] android.net.connectivity.com.android.server.net.NetworkStatsServiceTest#testDumpStatsMap: PASSED (1.187s)
[2/2] android.net.connectivity.com.android.server.net.NetworkStatsServiceTest#ThreadLeakMonitor: FAILED (7ms)
STACKTRACE:
java.lang.IllegalStateException: Expected threads: {binder:26055_3=1, Instr: androidx.test.runner.AndroidJUnitRunner=1, main=1, InstrumentationConnectionThread=1, binder:26055_2=1, binder:26055_1=1} but got: {binder:26055_3=1, NetworkStatsObservers=1, Instr: androidx.test.runner.AndroidJUnitRunner=1, main=1, InstrumentationConnectionThread=1, binder:26055_2=1, binder:26055_1=1}
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.net.NetworkStatsServiceTest \
--rerun-until-failure 100
Bug: 308544001
Bug: 307693729
Change-Id: Ia0bccb82c5985df608b8402009b32626b6b17c5a
|
2023-11-15 14:03:45 +08:00 |
| .. |
|
connectivity
|
Merge changes from topics "RemoveFindIPv4", "RemoveLegacyVpnRunner" into main
|
2023-11-13 05:27:07 +00:00 |
|
connectivityservice
|
Add test to make sure that unwanted local nets disconnect correctly
|
2023-11-07 22:28:25 +09:00 |
|
ethernet
|
Connectivity Tests: join handler thread after calling quitSafely
|
2023-03-17 01:01:09 -07:00 |
|
net
|
Ensure no thread leak after NetworkStatsServiceTest
|
2023-11-15 14:03:45 +08:00 |
|
BpfNetMapsTest.java
|
Merge changes Ie1a36c3c,Id727cf7b,Ifba198d9 into main
|
2023-11-07 19:32:51 +00:00 |
|
ConnectivityServiceTest.java
|
New firewall chain for default background restrictions
|
2023-11-08 10:17:30 +00:00 |
|
HandlerUtilsTest.kt
|
Move dumpsys to handler thread
|
2023-10-17 17:16:04 +08:00 |
|
IpSecServiceParameterizedTest.java
|
Require IPSEC_TUNNEL_MIGRATION feature flag to migrate transforms
|
2022-12-21 23:12:48 +00:00 |
|
IpSecServiceRefcountedResourceTest.java
|
Add some non-connectivity-module-test back to ConnectivityCoverageTests
|
2022-05-27 07:16:46 +00:00 |
|
IpSecServiceTest.java
|
Experimental support for IPv6 UDP encap.
|
2023-02-08 15:05:07 +09:00 |
|
LegacyTypeTrackerTest.kt
|
Build ethernet framework source into framework-connectivity-tiramisu
|
2022-03-14 14:06:35 +00:00 |
|
NetIdManagerTest.kt
|
Address comments on aosp/1781202
|
2022-08-17 07:11:55 +00:00 |
|
NsdServiceTest.java
|
Add expired services removal flag
|
2023-10-18 17:48:46 +08:00 |
|
VpnManagerServiceTest.java
|
Update VPN tests to mock out createAttributionContext
|
2023-06-12 18:06:47 +00:00 |
|
VpnTestBase.java
|
Test VPN app exclusion
|
2022-06-29 06:15:41 +00:00 |