When test case updates the wifi network from unmetered to
metered, test case will wait for wifi network reconnect.
However, if other metered networks are also connected at
the same time, test case may mis-take the network as the
target network. Thus, add transport type check to ensure
the transport type of the network is the expected one.
Bug: 153400606
Test: atest CtsNetTestCasesLatestSdk:\
android.net.cts.ConnectivityManagerTest#\
testGetMultipathPreference
Change-Id: I75dab1a00bbe1a1c75b548a6ce4ae3eacd325d92
Merged-In: I75dab1a00bbe1a1c75b548a6ce4ae3eacd325d92
(cherry picked from commit 495971d7b6abc65e6d506072038f499682f59f4d)
ConnectivityDiagnosticsManagerTest, MultinetworkApiTest,
NetworkAgentTest crashed before the runner could start them:
- Ignore ConnectivityDiagnosticsManagerTest on Q: it tests an API that
was introduced in R.
- Build JNI libraries used by MultinetworkApiTest against the NDK to
avoid errors loading the libraries on older platforms, when
transitive dependencies have been added.
- Do not attempt to override Handler#getLooper() (which is final) in
NetworkAgentTest; it appears to have been overridden by accident by
specifying "val looper" in the TestableNetworkAgent definition, which
generates a getter.
Test: atest CtsNetTestCasesLatestSdk:ConnectivityDiagnosticsManagerTest
atest CtsNetTestCasesLatestSdk:MultinetworkApiTest
atest CtsNetTestCasesLatestSdk:NetworkAgentTest
Bug: 150918852
Merged-In: I262b54c6897ed755adaeb2b118c638320634f7a1
Change-Id: I262b54c6897ed755adaeb2b118c638320634f7a1
Currently, this cause flakiness since some background traffic
was counted when performing tests, or the traffic generated by
adb over network. While there is no good way to filter out all
reasonable cases, disable the upper bound checks.
Test: atest TrafficStatsTest
Bug: 142978584
Change-Id: I22edc46039bf35e544d9ce8a9f3a00b713478e05
Merged-In: I22edc46039bf35e544d9ce8a9f3a00b713478e05
Merged-In: I8140310c9caeff6069d1f55590bf40f83bf211e4
(cherry picked from commit 8accc6aa11213a7a8287a2ec0f75f17a02173f99)
The new wifi disconnect behavior is introduced. When wifi
network is changed from unmetered to metered, the wifi
network will disconnect and reconnect. Update the test to
verify the same SSID wifi is connected and also update the
target network to verfiy the metered preference.
Bug: 153400606
Test: atest CtsNetTestCases:android.net.cts.ConnectivityManagerTest\
#testGetMultipathPreference
Change-Id: Ic298d3d85d8c6b77c8df7614a945f2c22dcdff38
Merged-In: Ic298d3d85d8c6b77c8df7614a945f2c22dcdff38
(cherry picked from commit 37d5d4387cce865d159e80e5101685b4c2a13731)
The tests verify behavior that was only fixed on R, but
UrlQuerySanitizerTest is part of MTS which needs to pass on Q.
Test: atest CtsNetTestCasesLatestSdk:UrlQuerySanitizerTest
Bug: 150904735
Change-Id: I214b2fd8a45732a41e8604db70c83a8e3f4a45e4
Add test for new API.
Bug: 151110379
Test: atest CtsNetTestCasesLatestSdk:android.net.cts.NetworkRequestTest
Change-Id: I9602cac142b3e45d12e66a6f3f35ab594e6590c1
Merged-In: I9602cac142b3e45d12e66a6f3f35ab594e6590c1
* changes:
Test setting config requests for TunnelModeChildSessionParams
Test setting proposal, TS and lifetime for ChildSessionParams
Add CTS for building IKE and Child SaProposal
Test: atest CtsNetTestCasesLatestSdk:android.net.cts.NetworkRequestTest
on both Q and R device
Bug: 153972141
Change-Id: I614963cdd5f26bf3d47246fdc9eb11e74d05a460
Merged-In: I614963cdd5f26bf3d47246fdc9eb11e74d05a460
(cherry picked from commit 8f9325fcf28c4248eb3eb4bf21ec6a103eec614a)
If a test fails without unregistering an agent, other tests will
see their requests match the old agent. That means any test failing
will fail all subsequent tests, which is not very helpful.
Solve this by making sure the agents are unregistered before the
test ends. Also ensure the requests are unregistered.
Test: NetworkAgentTest
Bug: 139268426
Change-Id: If183d78298aa2a0bcae9e2487199dee14014cdfb
Merged-In: I2c167803d478d31fd85dc6e6e621f35d36c68fb4
(cherry-picked from aosp/1284556)
When location is disabled, Wi-Fi scan results and SSID are not available
to apps.
Fixes: 153850762
Fixes: 153396893
Test: atest hostsidetests/net/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Change-Id: I05285811d7131e116d5e1d072137ed2cf9576d05
This change adds test for new public APIs.
Bug: 135998869
Test: atest CtsNetTestCasesLatestSdk:TrafficStatsTest
Change-Id: Iefc234fb85145b31a1f7842b93b4d6fc4425bab6
Merged-In: I6b4a6773e22a204b6267d28638b9f57a0d0eb65a
(cherry picked from commit e5a3234c38c35aaec55029e369f2aac2ec4326cd)
It's hard to read in current design, refactor the
assertion into assertInRange() for readability.
Bug: 153614624
Test: atest android.net.cts.TrafficStatsTest
Change-Id: I6d939dd62cad3d6ba23a3c5ca7b1e6a8b4131a90
Merged-In: I6d939dd62cad3d6ba23a3c5ca7b1e6a8b4131a90
(cherry picked from commit af3469bdc7031d80f3d3838518fd7518b3e8eb9c)
Add cts to test current public APIs and new public
APIs.
Bug: 151110319
Bug: 152617305
Test: atest CtsNetTestCasesLatestSdk:ProxyInfoTest
Change-Id: I3e7d2cb7b4c5e47fc85d418aa8ef504367b3d8db
Merged-In: I451989f7312fb98ec2fa0b7b9ddc856ecf2087be
(cherry picked from commit 0a4d5ecc83d56c2c3f400927a2b8af6e26eb8db8)
This is a basic test that only tests register(), markConnected(),
unregister and onNetworkUnwanted. It provides the backbone for
the tests, a harness to test callbacks on NetworkAgent, and
demonstrates how the instrumentation in
ConnectivityService can be used to test this API.
Test: this
Bug: 139268426
Change-Id: I859208f381ccc22a85d6bccb44c0d5d84c3380c6
Merged-In: I022c9e237fdaec27338047c171c04e5a96cf89e3
(cherry picked from commit 723b519dc2de077c37db510850a590188591a80b, aosp/1253423)