While previous tests benchmarking performance of reading
NetworkStatsCollection, this measures performance impact
caused by implementation of FileRotator.
Test: atest ConnectivityBenchmarkTests
Bug: 269409485
Change-Id: Ifcfc034128d6d78d759f80a43785b9f2b1ebb9c9
Add a test for benchmarking NetworkStatsCollection.
The test use data that generated from real user dataset which
has many uid records and agreed to share the dataset for testing
purpose.
Test: atest ConnectivityBenchmarkTests
Bug: 269409485
Change-Id: I8981bfc9f65636897c6fc735cda5353b448a0db2
When ServiceTypeClient is not used, the Executor threads should be
shutdown as well.
Bug: 287013457
Test: atest CtsNetTestCases FrameworksNetTests
Change-Id: I9dae01e7b6c2bcd395a98f4362f0c36f1535b2a6
Collect information about registration successes, failures, and
unregistrations, then build metrics data from this information
and report it.
Bug: 287546772
Test: atest FrameworksNetTestCases NsdManagerTest
Change-Id: I6324279b479da2e61b7519d96df5ad24a432e54a
Tests verifies the behavior with v4 mapped v6. The
taken parameter should be a v6 address. However,
InetAddresses.parseNumericAddress() will translate a v4
mapped v6 address into v4. This does not actually test
the behavior. The constant should be created via
Inet6Address.getByAddress() so that it will be an
expected Inet6Address.
Bug: 291869581
Test: atest NattKeepalivePacketDataTest
w/ and w/o aosp/2626269
Change-Id: I2f086f0fe7d1dd038f5d850f2281deb807c837cf
getLauncherPackageName sometimes returns "com.android.settings", causing
the test to fail.
Add polling for the launcher to not return settings, and logging to
try to understand why this happens, especially if polling does not solve
the issue.
Bug: 286550950
Test: atest
Change-Id: I90963d5db326732dfc82db07f36676190ffdcce9
When the device is charging, any `am set-inactive` commands would be
effectively no-ops. So, explicitly take the test app out of the app
idle state after changing the charging state.
Bug: 288220398
Test: atest services/tests/mockingservicestests/src/com/android/server/am/BroadcastQueueTest.java
Test: atest services/tests/mockingservicestests/src/com/android/server/am/BroadcastQueueModernImplTest.java
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:9290fb85fe3c16c1a424ffe32769c5b2927b4b74)
Merged-In: I152af12b404ac607fff794a527f45a0aad640d4f
Change-Id: I152af12b404ac607fff794a527f45a0aad640d4f
This is a no-op change. The Clock class is a wrapper that is
used for testing. So move it from MdnsResponseDecoder to
MdnsUtils for subsequence metrics changes.
Bug: 287546772
Test: m
Change-Id: If4c8c0061c76ae26fc78a5ff463a31d57470fba0
1. Unregister BroadcastReceiver of default subscription id.
2. Use a CompletableFuture to store and unregister the
OnSubscriptionsChangedListener. Note this has to be done since the
listener cannot be constructed in the handler thread.
Bug: 288059409
Test: atest FrameworksNetTests
Change-Id: Ia5fc3e53305a99c32ad2f6d5b1b6a367dc20c1d7
With installing test apps per test class instead of test cases,
the total execution time tests are improved from 1m56s to 1m34s
in local trials.
Notes: 1. This is a demonstration CL to other Hostside*Tests to show
how to make app2 can be installed per test class.
2. The method that executed per test class should not shadow
the method in the base class, see the doc of @BeforeClass.
Test: atest HostsideConnOnActivityStartTest
Bug: 289002798
Change-Id: Ia9875f0a9fdcb4fb4c55736034b56aad0491d451
Avoid throwing errors when something unexpected occurs with the
keepalive state since metrics should not cause a crash. Instead, disable
the tracker and skip writing the metrics.
Bug: 288059409
Test: atest FrameworksNetTests
Change-Id: I1cd5acb32eb062ccdf7d1ac3e25a21309ad011c2
To cache services and respond quickly, the MdnsServiceTypeClient
should add all services to the MdnsServiceCache and remove any
services from there as well.
Bug: 265787401
Test: atest FrameworksNetTests
Change-Id: If0a9e6b563a0992ac25b8cde7f3beb00700f1c11
Now that all access to MdnsServiceTypeClient parameters is
running on the handler thread, the synchronized lock is no
longer necessary. Therefore, the synchronized lock can be
safely removed from MdnsServiceTypeClient.
Bug: 265787401
Test: atest FrameworksNetTests
Change-Id: I5cd28aa738ea3c199b75097f4583e98be86a6ee7
This change use @BeforeClassWithInfo and @AfterClassWithInfo
annotated methods to install/uninstall test packages per test
class. This change also added custom static methods to
install/uninstall packages in order to bypass auto-cleanup
packages per test case design inside BaseHostJUnit4Test class.
Test: atest HostsideNetworkCallbackTests \
HostsideConnOnActivityStartTest \
HostsideSelfDeclaredNetworkCapabilitiesCheckTest \
HostsideVpnTests HostsideNetworkPolicyManagerTests
Bug: 289002798
Change-Id: I0c973a87d0c77262e6c0014c86ae59ae3cef6970