If a test fails without unregistering an agent, other tests will
see their requests match the old agent. That means any test failing
will fail all subsequent tests, which is not very helpful.
Solve this by making sure the agents are unregistered before the
test ends. Also ensure the requests are unregistered.
Test: NetworkAgentTest
Change-Id: I2c167803d478d31fd85dc6e6e621f35d36c68fb4
am skip reason: Change-Id I6b4a6773e22a204b6267d28638b9f57a0d0eb65a with SHA-1 f483cc9679 is in history
Change-Id: Ib0618bd8253eaa770e5ca2a49f6a4cde58e7e94e
This change adds test for new public APIs.
Bug: 135998869
Test: atest CtsNetTestCasesLatestSdk:TrafficStatsTest
Change-Id: Iefc234fb85145b31a1f7842b93b4d6fc4425bab6
Merged-In: I6b4a6773e22a204b6267d28638b9f57a0d0eb65a
(cherry picked from commit e5a3234c38c35aaec55029e369f2aac2ec4326cd)
am skip reason: Change-Id I022c9e237fdaec27338047c171c04e5a96cf89e3 with SHA-1 21793bad18 is in history
Change-Id: I778078bf84207f67c37bf510f4c3f1f570cfc7d5
am skip reason: Change-Id I451989f7312fb98ec2fa0b7b9ddc856ecf2087be with SHA-1 b03df59c70 is in history
Change-Id: I17709eca928ca225fa06f3120b51e130032caa9e
am skip reason: Change-Id I076241072688fca37b8451873183f9597bc5fe79 with SHA-1 2648ad46fe is in history
Change-Id: If0a8fe299a299890f8d391b287a854f25de111dd
am skip reason: Change-Id I6d939dd62cad3d6ba23a3c5ca7b1e6a8b4131a90 with SHA-1 cb68d1cd09 is in history
Change-Id: I938b8f0fce04019e9955fd10ed2363c4bf2336ca
am skip reason: Change-Id I2f49fc12314ac648e8df816058d599033c822dca with SHA-1 5c22928658 is in history
Change-Id: I5908da6e730557971bf22fbf1930b4892860b98c
It's hard to read in current design, refactor the
assertion into assertInRange() for readability.
Bug: 153614624
Test: atest android.net.cts.TrafficStatsTest
Change-Id: I6d939dd62cad3d6ba23a3c5ca7b1e6a8b4131a90
Merged-In: I6d939dd62cad3d6ba23a3c5ca7b1e6a8b4131a90
(cherry picked from commit af3469bdc7031d80f3d3838518fd7518b3e8eb9c)
Add cts to test current public APIs and new public
APIs.
Bug: 151110319
Bug: 152617305
Test: atest CtsNetTestCasesLatestSdk:ProxyInfoTest
Change-Id: I3e7d2cb7b4c5e47fc85d418aa8ef504367b3d8db
Merged-In: I451989f7312fb98ec2fa0b7b9ddc856ecf2087be
(cherry picked from commit 0a4d5ecc83d56c2c3f400927a2b8af6e26eb8db8)
This is a basic test that only tests register(), markConnected(),
unregister and onNetworkUnwanted. It provides the backbone for
the tests, a harness to test callbacks on NetworkAgent, and
demonstrates how the instrumentation in
ConnectivityService can be used to test this API.
Test: this
Bug: 139268426
Change-Id: I859208f381ccc22a85d6bccb44c0d5d84c3380c6
Merged-In: I022c9e237fdaec27338047c171c04e5a96cf89e3
(cherry picked from commit 723b519dc2de077c37db510850a590188591a80b, aosp/1253423)