android_packages_modules_Co.../staticlibs/testutils/host
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jimi Chen 419e088796 refactor: Lazy load IP addresses for APF tests
Previously, IPv4 and IPv6 addresses were retrieved in `ApfTestBase.setup_class`,
which meant all APF tests assumed the presence of both.

This change refactors `ApfTestBase` to introduce dedicated methods:
- `get_and_expect_ipv4_addresses_exist()`
- `get_and_expect_ipv6_addresses_exist()`

These methods now handle the retrieval and assertion of IP addresses.
Individual test cases in `ApfV6Test` are updated to call these methods
only when the respective address type is required for the specific test
scenario.

This improves test robustness by ensuring tests only depend on the
necessary IP addresses, allowing for more precise test setup and failure
reporting. Additionally, the doze mode activation is reordered to occur
after initial network setup.

Flag: EXEMPT mainline
Bug: 419427388
Test: atest CtsConnectivityMultiDevicesTestCases:ApfV6Test
Change-Id: I340bcb77fe66cc9927dcd58e5899cdf9a4375daa
2025-07-16 04:31:40 +00:00
..
java/com/android/testutils Make ConnectivityTestPreparer.apk path explicit 2024-12-05 14:46:29 +09:00
python refactor: Lazy load IP addresses for APF tests 2025-07-16 04:31:40 +00:00