An NullPointerException in tearDown is a symptom of an initialization
error and should not be reported in the test failure result.
Test: atest RateLimitTest
Change-Id: I9c1d6294678cdc9cdf4beae597f8373b92b52077
* changes:
Update API files to unhide MATCH_PROXY.
Update tests for NetworkStats code move.
Add setPollForce to module API
Add JNI stats libraries to apex Android.bp
Add JNI stats libraries to connectivity
[MS62.2] Add NetworkStatsService into service initializer
[MS54.8] Add hiddenapi-unsupported-t.txt to apex Android.bp
[MS54.3] Move NetworkStats to updatable sources
NetworkStatsFactory is moving from services.core to
service-connectivity-tiramisu. Update FrameworksNetSmokeTests and
FrameworksNetIntegrationTests to depend on the latter instead of the
former.
Test: atest FrameworksNetSmokeTests FrameworksNetIntegrationTests
Ignore-AOSP-First: part of large internal topic to avoid merge conflicts
(cherry-picked from ag/16786005)
Change-Id: Ie48dac421decf83440b7c88adea18152e05f03bb
Merged-In: Ie48dac421decf83440b7c88adea18152e05f03bb
Add new symbols to libservice-connectivity loaded on T only, and the
framework libraries to apex and tests.
Bug: 197717846
Test: atest FrameworksNetTests
(cherry-picked and splitting apex Android.bp to aosp/1994130)
Change-Id: Iae44344701a3267110e5cbf271120201134d59e5
Merged-In: Iae44344701a3267110e5cbf271120201134d59e5
The target preparer ensures that the device does not have change of
DeviceConfig while it is running the tests on S+ (R- is not supported by
the preparer).
This fixes flakes where settings get changed mid-test.
Bug: 210377950
Test: atest CtsNetTestCases
Change-Id: Icfbb402f31b6ee1321e9fcdab994233fb1981bb0
Assumptions that are placed in BeforeClass annotated methods are not
reported correctly. See b/203722419 for more information.
Test: atest RateLimitTest
Bug: 220801455
Change-Id: Ia7f0eaddc75d0ee091e107615f1677c75865dbcb
Caps are changing before the code is checking for no callback,
but the network is not validating ; something like RSSI or
link speed has been updated, which is fine as long as the
network doesn't validate.
Test: ConnectivityManagerTest
Change-Id: Ie9a167d3599b0157cc1cf6e93c36e9689e9cc2e0
As it turns out, /proc/config.gz can be accessed via shell command from
within a CTS test. This adds a proper kernel support check for the
RateLimitTest.
Bug: 220801455
Test: atest RateLimitTest
Change-Id: I4d3a6848c1c05c313cb74b235294cee982eecf57
This test is highly flaky in presubmit with error messages that
look like:
java.lang.AssertionError: Did not receive callback after 200ms
The test itself looks correct, so it's possible that 200ms just
isn't enough time for the callbacks to be delivered. Set the
timeout to DEFAULT_TIMEOUT_MS like most of the other
TestableNetworkCallbacks in this class.
Fix: 218389790
Test: test-only change
Change-Id: Ie68356a48e9618e5fea3865aa06bfbfc457b89c4
This is being added as the lowest priority score factor, just
above the tie-breakers. It ensures that a network that has been
destroyed will lose to another identical network that has not
been destroyed, but will otherwise be scored identically.
The flag is a CS-managed flag that is stored in NetworkAgentInfo.
Currently it is always false, but it will be populated in
future CLs.
Bug: 216567577
Test: atest FrameworksNetTests
Change-Id: Ib1cd342ab7dfc4df45715da19b743d711fe8d605
These also cause ConnectivityCoverageTests to fail when built
from master and run on S. They are used in Vpn.java, not
LockdownVpnTracker.
They were not addressed in the previous CL because running this
test locally is difficult.
Test: forrest
Change-Id: I7d687338fd6bc7468b1abcae58898322554e647b
LockdownVpnTracker directly uses resources from
com.android.internal.R. This is acceptable because it's platform
code. But ConnectivityServiceTest uses the LockdownVpnTracker
built from the module source tree, and when that code fetches
resources on a previous Android release, it crashes because the
resource IDs don't exist; non-public resource IDs aren't stable.
Fix this by mocking the resources used by LockdownVpnTracker.
Test: atest ConnectivityCoverageTests
Change-Id: I239a18a38d4f1082f76f5ff1b831c15ee753bdfd
This test creates a TUN interface and registers it with
ConnectivityService. For 15 seconds, it continuously writes data to that
interface and measures at what rate it is received.
Data accounting is currently not covered by this test.
Test: atest RateLimitTest
Bug: 172053704
Change-Id: I74f891f3b7113855375c48a10cefbfe47221931b
This patch adjusts the behavior of the NetworkMonitor mock
to behave the same way as the real one – accept either
notifyNetworkConnected or notifyNetworkConnectedParcel as
a signal a network is connected. This is necessary because
the Connectivity module will call either of these depending
on versions of other software it finds on the device.
Test: ConnectivityServiceTest
NetworkMonitorTest
Change-Id: I5900a019b3b033f4365d8a82b1e522336012064e
This makes the code easier to maintain because we do not need to
manually add string representations, and because it will throw at
static initialization time if the clas contains duplicate
POLICY_xxx values. The memory overhead is likely negligible.
Bug: 216567577
Test: new coverage in FullScoreTest
Change-Id: Iab23d414c8e28ff7f26060ad44fa996f277d361f
Some TV's do not resume the previous activity coming back from sleep.
Add a case to restart activity.
Derived from
https://android-review.googlesource.com/c/platform/cts/+/1358002
(Bug: 148812676)
Test: Verified existing passing tests continue to pass on TCL Beyond TV
(Pie)
Change-Id: I86fe80c5326065ac349585d1ab95736132ddfb5a