Fix NetworkStackCoverageTests on Q
Fix regressions in the coverage tests when run on a Q device: - Do not attempt to verify CaptivePortalData in IpClientIntegrationTest on Q, since it cannot be set considering that the class does not exist on Q. - Replace HexEncoding.encodeToString(byte[], boolean) with HexEncoding.encodeToString(byte[]) in StructNdOptPref64Test. - Skip ModuleNetworkStackClientTest using DevSdkIgnoreRule instead of assumeTrue() in setUp, as the latter would still run tearDown(). - Ignore NetworkStatsUtilsTest: this is a unit test for a test utility, and that utility uses R APIs (so can only be used in R-only tests). - Lazy-initialize LinkProperties with capport attributes in NetworkStackNotifierTest as initializing at class creation would crash. - Manually create a INetworkMonitorCallbacks mock in NetworkMonitorTest, create capport LinkProperties on demand, and skip capport tests that cannot run on Q. Test: atest NetworkStackCoverageTests Bug: 152723363 Change-Id: I3ae98e24a542c6313e06bcc787ad5a0a2a1db723
Loading
Please register or sign in to comment