android_packages_modules_Co.../tests/cts/hostside
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Suprabh Shukla a8ad3d5ef0 Deflaking network access checks in CtsHostsideNetworkTests
Checking that the network was successfully restricted before starting
the activities in ConnOnActivityStartTest. This avoids races between uid
state changes and device state changes in NPMS code that lead to
unpredictable UnknownHostException flakes in the first iteration.

Moving the java cache clearing to happen immediately before the check,
so no side effect from different code can impact the DNS query.

Increasing the socket-timeout to mitigate socket timeout failures.

Changing the default test URL to generate a 204 to avoid any extraneous
errors that may arise in doing other I/O, and switching to the canonical
connectivity check URL on the android.com domain.

Enabling support for passing down a custom url to use for testing
network connectivity using the runner options. This will enable easily
switching between different URLs for debugging when required.

Using a dedicated data class to encapsulate information to be returned
from test app to the instrumentation app.
This makes the logic more resilient, readable and maintainable.

Test: atest CtsHostsideNetworkTests:HostsideConnOnActivityStartTest --\
--test-arg com.android.compatibility.common.tradefed.testtype.JarHostTest:\
set-option:com.android.cts.net.HostsideConnOnActivityStartTest:\
custom-url:"https\://www.example.com"

Bug: 330406935
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:04c638ee3a5bab7895817ebfc0d3f6a69b1ee26d)
Merged-In: I139408fc0a9ffa21d7bd2f3f249d45a7b25243b4
Change-Id: I139408fc0a9ffa21d7bd2f3f249d45a7b25243b4
2024-04-02 05:51:41 +00:00
..
aidl Deflaking network access checks in CtsHostsideNetworkTests 2024-04-02 05:51:41 +00:00
app Deflaking network access checks in CtsHostsideNetworkTests 2024-04-02 05:51:41 +00:00
app2 Deflaking network access checks in CtsHostsideNetworkTests 2024-04-02 05:51:41 +00:00
certs [DON'T BLOCK] Test ownership migration rules 2024-01-31 12:34:50 +00:00
instrumentation_arguments Deflaking network access checks in CtsHostsideNetworkTests 2024-04-02 05:51:41 +00:00
networkslicingtestapp [DON'T BLOCK] Test ownership migration rules 2024-01-31 12:34:50 +00:00
src/com/android/cts/net Deflaking network access checks in CtsHostsideNetworkTests 2024-04-02 05:51:41 +00:00
Android.bp CTS for default background network restrictions 2024-02-13 17:08:10 -08:00
AndroidTest.xml Disable LowPowerStandby by adding configuration 2023-11-15 02:48:09 +00:00
OWNERS Set noparent in connectivity CTS owners 2020-12-03 08:07:32 +00:00
TEST_MAPPING Skip presubmit for flaky tests in HostsideVpnTests due to Out of SLO 2023-07-26 16:20:09 +08:00