- Retry on all cases (not only when expecting connected).
- Uses exponential back-off for timeout.
BUG: 27803922
Fixes: 30509643
Change-Id: I42454f43158598a72e30f290c27c5a02e80ea6d2
When counting all connectivity changed events, we were failing
on devices with sim cards because we were counting both wifi and
mobile connectivity changes the same. Since the test only
toggles wifi, changing the listener only to pay attention to wifi
changes.
Bug: 29346253
Change-Id: I1ed3b976bc21419218c780d4afc4a5e73f128496
If InetAddress.getAllByName("ipv6.google.com") throws
UnknownHostException, the test silently ignores it. This
causes a misleading failure, because the test then reuses the
addrs variable that is left over from the previous DNS query
for "www.google.com", and fails because it has an IPv4 address.
Fixes: 12210306
Bug: 29231261
Change-Id: I1dde945765d40a84eba139055306b07ebc97d0ec
Symptom:
testTrafficStatsForLocalhost fails when applications or services
except CTS are using network.
Root cause:
testTrafficStatsForLocalhost can't calculate the number of
non-localhost packets for CTS.
It includes the all of packets for applications/services except CTS
and non-localhost packets for CTS.
Solution:
Remove this assertion and only logging the number of packets.
Change-Id: I49243d59f359f3a543c6bdb46f6a2645cde8f292
It cannot use google.com because it's blocked in some countries where
CTS tests are run.
BUG: 29082308
Change-Id: I749659ec2cd33248fddbe5b4ab02bd6e90f24a67
Confirming that connectivity change broadcasts can be received
when explicitly registering for them in N, and via the manifest
pre-N.
Confirming that new_photo and new_video broadcasts are not received.
Bug: 28122277
Change-Id: Icfc27364a41ee8f4a55920e295ba658a367bb7d2
As WifiCheck is now declared in the CTS config, remove declarations in
the module configs.
Also downgrade TargetSetupErrors on failure to logged errors
bug:28234985
Change-Id: I2e1a369bc26aeca922686c4c3d8c033bb7f9fbc7
- Tests what happens on foreground applications when a restriction (like
Data Saver or Battery Saver modes) is turned on (prior tests would
turn the restriction on *before* switching the app to foreground).
- Tests multiple restrictions simultaneously enabled.
Also improved existing code:
- Fixed background state check.
- Reused some common checks in helper methods.
- Retries checks for process state.
BUG: 28473659
Change-Id: Ifcf9cc6d895ccde0ab5177f9f5d8c347ce53b811
There are known issues that cause these check to fail, and the fix has
not been submitted yet.
BUG: 28473659
BUG: 28521946
Change-Id: I26dfbebc2d07396ef89ac78230645e4791c708ee
Also fixed code that checks for whitelist uids, otherwise it would pass
when the required uid is missing but a superset was present (for
example, when asking for 1009 but 10090 was whitelisted).
BUG: 28431507
Change-Id: Iaaa67e586907dba215496460445ad627ba7b63c5
1. Test NetworkCallbacks as well as CONNECTIVITY_ACTION, since
we are moving away from CONNECTIVITY_ACTION.
2. Use the Network objects we get back to test
Network#getSocketFactory().
3. Check that TCP connections are closed with ECONNABORTED when
a network disconnects.
Bug: 28251576
Change-Id: I41a438b82ef9251e52866332f3445f1bf876e04f
X509TrustManagerExtensionsTest used internal implementation details to
test X509TrustManagerExtensions#isUserAddedCertificate, these
implementation details are no longer the same and so this test failed to
catch the API being broken and then incorrectly flagged the fixed API as
broken.
To ensure that isUserAddedCertificate is properly covered the tests for
the API are split into two places: X509TrustManagerExtensionsTest covers
tests for the default case where there are no added CAs and
CaCertManagementTest to test the behavior when CAs have been added.
Bug:28262103
Change-Id: I14f3211c277fdc9c8bfc3d4ac932be375961fa28
- On hostside, checks if wi-fi is on instead of checking for connectivity (which can be very slow).
- Don't automatically reset metered network on superclass' tearDown().
- Make sure tearDown() cleans up all state changes.
BUG: 27808364
Change-Id: I4818047c5fb8f6f430b0aab5ecfa77717f860db3
Some partner test networks connect by VPN and if the connection
fails during the testing this test will fail as the local internet
provider intercepts the DNS request and returns an ipv4 address.
Added a message to check the network configuration and rerun the test.
Bug: 26560000
Change-Id: I54e4976b2cef549bfe9fd55ff9609ba2e6513239