The behavior was not previous covered and broke in N
due to commit c80af6d8. There is an associated fix
in frameworks/base.
Some refactoring of existing tests to reduce
duplication and tidy up sockets after tests.
Test: Ran the new CTS test (before and after related fix)
Bug: 31205169
(cherry picked from commit 52376fc1c8)
Change-Id: I9ee96a91abbdaaba64c2f6daf49c92d1b23352e2
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
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
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
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
This adds one more assert statement to ensure the ScanResult
variable is not null before we proceed.
Bug: 27744749
TEST=run cts test without error
Change-Id: I48f3c5369792d3a55b594b71250b0dfdf0d5282b
There is nothing in the WifiWatchdog test that supports the
assumption that the device under test is pre-configured with a
working WiFi network configuration. This CL makes it possible
from the test stack trace whether the test failed at the
beginning or during the reconnections.
Bug: 27638295
Change-Id: Iff1bd398c74076fb1a969741818562ea582e868e
Wifi framework only enables a network if it is going to connect to it
which is not the case when 'disableOthers' flag is false.
BUG: 27567420
Change-Id: I45d39f4f8efebd7e19fd0bcf5bd97a68d08217ee
am: fc9df7044f
* commit 'fc9df7044f0aa6c860fc0e11f510b1aa10fd8b24':
AbstractVerifierTest: adapt tests to reflect that tabs are preserved by the DN parser
am: 5982f2bc9a
* commit '5982f2bc9aa50360ebde52a721da71c6f72af526':
AbstractVerifierTest: adapt tests to reflect that tabs are preserved by the DN parser
Recently in
53f06c0d1d
I changed the tests to reflect the fact that tabs and newlines were
discarded.
I must have made some mistake verifying the change, as tabs seem preserved.
Changing the assertion for tabs.
Bug: 26517725
Change-Id: I514a3d670019e3e2911e2c69b434d0f577ff9b7a
In a DN like "cn=\na" the "\n" now gets trimmed, which makes sense.
Changing tests to reflect the change.
Bug: 26517725
Change-Id: I641687dd864524d66b925f555000edd44c970962