The test simply verify the constructor. They only apply on S+ as
InvalidPacketException is not updatable before S.
Bug: 187935317
Test: atest InvalidPacketExceptionTest
Change-Id: I33f1ee1702672204a46063e6e75c3880d5e7600b
Tests for the newly added QosCallback functionality
Bug: 155176305
Test: Added to cts/NetworkAgentTest
Change-Id: I29769fc8be074a5105bfe4ac34e30980c5f8744a
Add tests for requestNetwork and registerNetworkCallback with
PendingIntents that are equal as per PendingIntent.intentFilterEquals.
In such situations, the first request is documented to be automatically
unregistered. This means that the PendingIntent should only be fired
once, instead of being fired for both requests.
Currently this behavior is broken for network callbacks (not for network
requests).
Test: atest ConnectivityManagerTest
Bug: 174237997
Change-Id: Ic636c731c71474ef09043d7a26ccfd6e2bb5c39f
ConnectivityManager.setAvoidUnvalidated only works if the
config_networkAvoidBadWifi configuration is set to 0 and the
NETWORK_AVOID_BAD_WIFI setting is unset. There is no easy way
for a testing app to temporary set a test value to verify the
behavior of the API. Thus, add a mechanism to allow test app
to set a period of time to temporary unstrict the resource
configuration, i.e. Temporary simulate config_networkAvoidBadWifi
configured to 0.
Bug: 186061922
Test: atest CtsNetTestCases FrameworksNetTests
Change-Id: If772078c61a9b12926f104d5dfc9c9071e844732
The tests are also useful in CTS to ensure that the
ConnectivityDiagnosticsManager class API is implemented properly
(including behavior of the DataStallReport class for example).
Bug: 187935317
Test: atest ConnectivityDiagnosticsManagerTest
Change-Id: I86f39238054f43403f9a1e383dd2a935de84f06f
ConnectivitySettingsManager and CtsNetUtils are doing the same
thing to set/get private DNS related settings.
To prevent making the duplication code in two places, move the
body to frameworks/libs/net and call it.
Bug: 185311744
Test: atest CtsNetTestCases CtsNetTestCasesLatestSdk
Change-Id: I3272c825b86ec30c3d0bf4097088c653e668461b
BYPASS_INCLUSIVE_LANGUAGE_REASON=To make the change more clear,
fix the inclusive problem in a follow-up commit.
Bug: 176289731
Test: atest CtsHostsideNetworkTests:HostsideNetworkPolicyManagerTests
Change-Id: Ie6bda8570979b10a28dbeb20f6db7a9c44735964
This CL adds tests to verify that after setting
IpSecTunnelInterface to use a different undelying network and
re-applying IpSecTransforms with matching addresses, traffic
can be routed to/from the new underlying network.
All these new tests will be skipped if SDK < S
Bug: 169855650
Test: atest IpSecManagerTunnelTest (new tests added)
Change-Id: Iab26159e5e070574e552d62e4f0780059a51a9c7
Increasing the timeout values for waiting for callbacks for the per-app
CTS tests to match the timeout value used in the waitForAvailable()
helper method.
Bug: 191230288
Test: atest CtsNetTestCases:android.net.cts.ConnectivityManagerTest
Change-Id: I49e5a99f18a5651370e6914f30be659134b537ff
The always bit is verified in NetworkAgentTest. There is no easy
configuration to set an explicitly selected network to accept an
unvalidated network. Verify the accepted case also in
NetworkAgentTest.
Bug: 186061922
Test: atest CtsNetTestCases:android.net.cts.ConnectivityManagerTest
Test: atest CtsNetTestCasesLatestSdk
Change-Id: I803eb975fb0b6c52d55b2310293bcad407d21f42
* changes:
Fix expectCallback does not fail when no callback received
Add CTS for registerBestMatchingNetworkCallback
No-op refactoring of NetworkAgentTest
The coverage tests will allow measuring code coverage for all
Connectivity+Tethering code.
This is a combination of the current TetheringCoverageTests, and
FrameworksNetTests.
Adding min_sdk_version to the test prevents it from using deprecated
IoUtils utilities. Replace it with the non-deprecated alternative.
Test: atest ConnectivityCoverageTests
Change-Id: I5366e1cc9cd6ddb41f24718246381cc2b1cc1383
This does not change the mockito library to use mockito-extended in
FrameworksNetTests, but changes the tests so that they would pass if
built against that library.
This is useful to run FrameworksNetTests in a common test suite with
other tests that use mockito-extended, for example a common connectivity
coverage test target.
The change includes increasing the test timeout in
ConnectivityServiceTest, as mockito-extended can have performance impact
(~3 times on hwasan builds). This change does not make tests run slower
in the current FrameworksNetTests suite though.
Bug: 187935317
Test: atest FrameworksNetTests
Change-Id: I61fa371e8957037075a2617a014647ff062207c6