Commit graph android_packages_modules_Co.../Cronet/tests
Message SHA1
Revert^2 "Revert "Revert "Revert "[Cronet] Disable one of setURLSt..."
This reverts commit 67df9f0870.

Reason for revert: broke native coverage b/333108088

Change-Id: Ice6cedcdeb35644eb0ee9edbac659feed21496ad

Chidera Olibie   authored and   Gerrit Code Review   commited 2024-04-09 15:00:27 +00:00
9957a8bb71
Revert "Revert "Revert "Revert "[Cronet] Disable one of setURLSt..."
Revert submission 3005178-revert-3001326-revert-2998737-revert-2980591-cronet_121_0_6167_71-JBOUFGJXPX-ICXECJPUPA-OOMALUYYUV

Reason for revert: aosp/3022283 fixed coverage issue

Reverted changes: /q/submissionid:3005178-revert-3001326-revert-2998737-revert-2980591-cronet_121_0_6167_71-JBOUFGJXPX-ICXECJPUPA-OOMALUYYUV

Change-Id: Ifb729927f64016383f75f8f4f0f3ae06a8fc2625

Chidera Olibie   commited 2024-04-02 12:07:04 +00:00
67df9f0870
Merge changes from topic "revert-3001326-revert-2998737-revert-2980591-cronet_121_0_6167_71-JBOUFGJXPX-ICXECJPUPA-OOMALUYYUV" into main
* changes:
  Revert "Revert "Revert "[Cronet] Disable one of setURLStreamHand..."
  Revert "Revert "Revert "cronet 121_0_6167_71: remove http_client..."

George Verhaegen   authored and   Gerrit Code Review   commited 2024-03-20 13:39:16 +00:00
4a18c1bc11
Revert "Revert "Revert "[Cronet] Disable one of setURLStreamHand..."
Revert submission 3001326-revert-2998737-revert-2980591-cronet_121_0_6167_71-JBOUFGJXPX-ICXECJPUPA

Reason for revert: Build breakage as b/330450460

Reverted changes: /q/submissionid:3001326-revert-2998737-revert-2980591-cronet_121_0_6167_71-JBOUFGJXPX-ICXECJPUPA

Change-Id: I9b835950cf92abb0d54cafc332cf310ceef5061a

Lisa (LeeWei) Liu   commited 2024-03-20 08:28:59 +00:00
e307e20d47
Merge changes from topic "revert-2998737-revert-2980591-cronet_121_0_6167_71-JBOUFGJXPX-ICXECJPUPA" into main
* changes:
  Revert "Revert "cronet 121_0_6167_71: remove http_client_logging..."
  Revert "Revert "[Cronet] Disable one of setURLStreamHandlerFacto..."

Chidera Olibie   authored and   Gerrit Code Review   commited 2024-03-20 04:19:06 +00:00
52dceb80bd
Revert "Revert "[Cronet] Disable one of setURLStreamHandlerFacto..."
Revert submission 2998737-revert-2980591-cronet_121_0_6167_71-JBOUFGJXPX

Reason for revert: aosp/3003361 fixed failing test. See b/329605950.

Reverted changes: /q/submissionid:2998737-revert-2980591-cronet_121_0_6167_71-JBOUFGJXPX

Bug: b/327182569
Test: atest NetHttpTests
Change-Id: Ic5bf27b44ef319c2921c000f801c49ea752b6c19

Chidera Olibie   commited 2024-03-18 13:46:14 +00:00
6ad32fb992
Use efficient coverage dumping mechanism
See aosp/3003852

Test: atest NetHttpCoverageTests
Bug: 329823447
Bug: 329680904
Change-Id: I5ba1141987353e2b160a5dd5cbed6a35d074b2c4

Mohannad Farrag   commited 2024-03-15 14:25:09 +00:00
58d83d4a43
Switch Cronet MTS to Orchestrator
* Switching Cronet tests to the orchestrator means
that we will be able to run tests exactly like how they are
run in Chromium, as seen in this CL, this has allowed running
previously disabled tests.

* This change comes with an introduced latency which is not hugely
impactful (Measured to be around 400ms per test case) which takes
our runtime from ~6 minutes to ~10 minutes on average. This is an
acceptable impact for better coverage. If it increases beyond that
then we can utilize sharding but that is not required at the moment
or in the foreseeable future unless we have passed 1000 test case.

Test: atest NetHttpCoverageTest
Bug: 329823447
Change-Id: I1fff900341d958b8f00fc777e909b3583a83cc6a

Mohannad Farrag   commited 2024-03-15 14:25:09 +00:00
4fc2dbb970
Revert "[Cronet] Disable one of setURLStreamHandlerFactory test"
Revert submission 2980591-cronet_121_0_6167_71

Reason for revert: Seems to be the cause for b/328855816

Reverted changes: /q/submissionid:2980591-cronet_121_0_6167_71

Change-Id: Ia47515958eec58b851cfbb8e74e0e9ab58679323

Patrick Rohr   authored and   Gerrit Code Review   commited 2024-03-11 19:08:45 +00:00
327484b0d3
[Cronet] Disable one of setURLStreamHandlerFactory test
Bug: b/327182569
Test: atest NetHttpTests
Change-Id: Ibd49567fb8198c7c5b4b8808a5e8181dc32eea61

Chidera Olibie   commited 2024-02-28 10:20:08 +00:00
0f4c915eae
[DON'T BLOCK] Test ownership migration rules
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.

For more details please refer to the link below,
<add g3 doc link>

Bug: 304529413
Test: N/A
Change-Id: I243f17b3f0ad7af9ffa15ca242456e36688733f5
Merged-In: I243f17b3f0ad7af9ffa15ca242456e36688733f5

Aditya Choudhary   commited 2024-01-31 12:34:50 +00:00
01b5ede2b2
Merge "Fix thread leak in HttpEngineTest" into main
Junyu Lai   authored and   Gerrit Code Review   commited 2024-01-25 05:58:53 +00:00
c1f1b29ca4
Fix thread leak in HttpEngineTest
Locally created test http server was not terminated.
Use the test http server globally available instead.

Test: atest NetHttpCoverageTests --rerun-until-failure 3
Fix: 320964365
Change-Id: Ida01664df1640da7db22d03519d842f0c49309c7

Junyu Lai   commited 2024-01-24 11:15:41 +08:00
54fddc3e54
Push test-data to device
* Push the test-data to the device in the expected destination, this is needed to get rid
of the divergance in TestFilesInstaller.
* Stop jarjaring tests Jni classes.

Test: TH
Bug: 304217500
Change-Id: I07fa7ed09f90bf286805479edc5238b6268d59f0

Mohannad Farrag   commited 2024-01-18 16:47:49 +00:00
38885e3d57
Add support for reading net/data/ssl/certificates files
* After supporting netty, the certificates files are needed to start up the HTTP server. Those files must be moved to the emulator which happens through the changes in AndroidTest.xml, isolated-storage
has been disabled to allow the emulator to access the storage freely without restriction. Otherwise
I will have to change the destination of the data files which will result in divergence.

* Added the newly introduced test utility java classes including netty to the `jarjar_excludes` as they must not be jarjared because they are not part of the bootclasspath.

Test: atest NetHttpTests
Bug: 319629150
Bug: 304217500
Change-Id: I2331873a9e178783319f889a377ba7e390ecdd6f

Mohannad Farrag   commited 2024-01-18 11:29:30 +00:00
2ba5c6243e
Merge changes from topic "import_v121_0_6103_2" into main
* changes:
  Don't jarjar org.chromium.net.LogcatCapture
  Patch crrev/c/5152885
  Disable failing tests for Cronet import v121.0.6103.2

Treehugger Robot   authored and   Gerrit Code Review   commited 2024-01-11 13:30:35 +00:00
4ca084bad6
Don't jarjar org.chromium.net.LogcatCapture
This is a test-only utility class that must not be jarjared. If it is jarjared
then it becomes inaccessible to testing.

Test: atest NetHttpTests
Bug: 314275954
Change-Id: I6cb8eeca58b3dc506cd1e6f1fb6de00df9086509

Mohannad Farrag   commited 2024-01-09 17:08:31 +00:00
577e895cb2
Patch crrev/c/5152885
See https://chromium-review.googlesource.com/c/chromium/src/+/5152885

Bug: 314275954
Bug: 311373434
Change-Id: I1a846c8c8206aa0d17f1fe70740881e72921d179

Mohannad Farrag   commited 2024-01-09 17:08:25 +00:00
e29ee6ae2a
Disable failing tests for Cronet import v121.0.6103.2
some of the tests are completely new tests that have been added in the latest cronet import.
Fixing those tests on the fly while doing an import is going to be a lot of work, temporarily disable
those tests and created bugs to track them.

The rest of the tests were disabled through `@Ignore` annotation but that introduced divergence.

Bug: 314275954
Change-Id: I1ec2be189b5db4d08d410fa000a04c900f47113b

Mohannad Farrag   commited 2024-01-02 19:27:43 +00:00
a0544e0f61
Add mcts tag to MainlineCTS networking test modules which is used for build all the mainline CTS tests.
Bug: 316436957

Change-Id: I0e7ab773075fb0dfd154dde45a710d1c1823c914

Tongbo Liu   commited 2023-12-19 11:03:50 +00:00
199357ba68
[Cronet] NetHttpCoverageTests presubmit SLO fixes
- Adds NetHttpCoverageTests to postsubmit. This would allow us
to run tests with @SkipPresubmit in post submit.
- Don't jarjar com.android.testutil so that the annotation can
still be found by the testrunner.

Bug: b/293843426
Test: th
Change-Id: I9e792d338515acba798092bbc4c615aef2cac47a

Chidera Olibie   commited 2023-08-17 14:52:31 +00:00
be9f351f36
[Cronet] skip presubmit for flaky tests
Bug: b/293141085
Bug: b/292298108
Test: n/a
Change-Id: Ie7190c0222bd75f3f2df0c5b757b1ab9d0114d77

Chidera Olibie   commited 2023-07-25 20:56:29 +00:00
cd038a07fb
[Cronet] Cancel stream before shutdown
This fixes the flakiness. Because we call to a real server,
the server may not be reachable and our assumption would fail.
When this happens, the stream hangs and engine shutdown fails with
active request error. Hence cancel the stream before calling
shutdown.

Also @Ignored this test despite the fix as a safety measure to meet
the SLO. Will re-enable afterwards.

Bug: b/292298108
Test: atest NetHttpCoverageTests --test-filter
BidirectionalStreamTest#testBidirectionalStream_GetStream_CompletesSuccessfully
Change-Id: Iaae61fc62a148b58af86fb29c248399041785f9b

Change-Id: Iea9ef0b8468ec6fa05c306ea394485cec706b9ef

Chidera Olibie   commited 2023-07-25 16:05:10 +00:00
54db2af362
Move OWNER reference master=>main.
BUG=b/291759353

Change-Id: Iad1bae21b54ae1ed192960da9fd8b831709a2f87

Sam Saccone   commited 2023-07-18 17:12:49 +00:00
fbfe27b641
Merge changes from topic "revert-2657749-revert-2647150-httpclient-wrapper-GZUDLKEBSH-IKOKBJPMHS" into main
* changes:
  Revert^2 "Connectivity: Depend on new httpclient targets"
  Revert^2 "Cronet's MTS: don't depend on platform Cronet"

Patrick Rohr   authored and   Gerrit Code Review   commited 2023-07-17 21:15:54 +00:00
81559e711f
Revert^2 "Cronet's MTS: don't depend on platform Cronet"
1f968f68ae

Change-Id: I6aabb1b3f59abc1c7165a997de62ea141a615834

Stefano Duo   authored and   Gerrit Code Review   commited 2023-07-17 14:52:21 +00:00
afd03947b4
Merge changes from topic "revert-2647150-httpclient-wrapper-GZUDLKEBSH" into main
* changes:
  Revert "Cronet's MTS: don't depend on platform Cronet"
  Revert "Connectivity: Depend on new httpclient targets"

Stefano Duo   authored and   Gerrit Code Review   commited 2023-07-17 08:49:29 +00:00
bb873a0615
Revert "Cronet's MTS: don't depend on platform Cronet"
Revert submission 2647150-httpclient-wrapper

Reason for revert: ndk build break (b/291449552)

Reverted changes: /q/submissionid:2647150-httpclient-wrapper

Change-Id: I66f953e2a86867ba5ff02b88f9c5d7edeb171b98

Stefano Duo   commited 2023-07-17 08:44:52 +00:00
1f968f68ae
Merge changes from topic "httpclient-wrapper" into main
* changes:
  Connectivity: Depend on new httpclient targets
  Cronet's MTS: don't depend on platform Cronet

Stefano Duo   authored and   Gerrit Code Review   commited 2023-07-14 14:36:36 +00:00
73a61abe1a
BidirectionalStreamTest: don't cancel and block in teardown
Calling callback.blockForDone() on a non-started stream's callback will
block until it timeouts (12s). Currently, only a single test within
BidirectionalStreamTest actually starts the stream. This means that
every other tests is calling callback.blockForDone() during teardown
for no reason at all and they will just get stuck for 12s.

Change-Id: Ia40cbc371b4e2450dcd92a3ad429ff4351931a21

Stefano Duo   commited 2023-07-12 09:54:39 +01:00
515807ff72
Cronet's MTS: don't depend on platform Cronet
MTS tests shouldn't load Cronet from the platform (through the
bootclasspath). They should instead bundle it directly.

Things still need to be jarjar'ed to avoid clashing with classnames on
the bootclasspath (which would otherwise take precedence). Though, this
will no longer be needed once the android.net.http -> org.chromium.net
wrapper lands (MTS will then target org.chromium.net directly, which
isn't exposed through the bootclasspath).

Bug: 288886953
Test: m & th
Change-Id: I1533b357889e13e5e1c739c8a8419d21b10face3

Stefano Duo   commited 2023-07-06 18:53:06 +01:00
a3b0b0a276
Add CTS for BidirectionalStream's getters
Getters were introduced in aosp/2471845.

Bug: 288886953
Change-Id: I9c2547abff452ffec2067a2109f5a80d2a3de7bf

Stefano Duo   commited 2023-06-29 11:48:34 +01:00
23b3543a3f
Add CTS for UrlRequest's getters
Getters are an AOSP-only concept introduced in aosp/2471845.

Bug: 288886953
Change-Id: I83cdeb7eb680105a194a1ad9f435e681253d25b3

Stefano Duo   commited 2023-06-27 11:41:31 +01:00
1dfec2c573
Merge "cronet tests: Do not run integration tests on R"
Treehugger Robot   authored and   Gerrit Code Review   commited 2023-06-06 03:03:12 +00:00
3e5aab1eda
cronet tests: Do not run integration tests on R
CtsNetHttpTestCases were missing a DevSdkIgnoreRule after updating the
min_sdk version to R+ (which made it installable on R where the cronet
classes are not in the bootclasspath.)

Test: atest CtsNetHttpTestCases
Bug: 259632936
Change-Id: I706ff92376227c1759fd6e542066fcff3a7cf052

Patrick Rohr   commited 2023-06-05 15:32:54 -07:00
92c4636c5c
Merge changes from topic "cronet-114.0.5715.0"
* changes:
  cronet import: do not jarjar J.cronet_tests_N
  cronet tests: remove most of NetHttpTestsLibPreJarJar

Patrick Rohr   authored and   Gerrit Code Review   commited 2023-05-26 15:05:58 +00:00
a2175bd595
cronet import: do not jarjar J.cronet_tests_N
Cronet tests do not use a jarjar prefix, so do not jarjar their J/N
implementation.

Test: atest NetHttpTests
Bug: 278639767
Change-Id: Ie4b8bfa13ecbbca014e22d653fa0d39a5554c10e

Patrick Rohr   commited 2023-05-25 23:36:26 -07:00
311feaff8b
cronet tests: remove most of NetHttpTestsLibPreJarJar
Since cronet_java_tests (previously cronet_aml_javatests_sources) is now
an android_library directly in external/cronet (to support "mm" in that
folder), the dependencies can be removed.

A form of android_library is still required to wrap cronet_java_tests,
so the AndroidManifest (in this folder) is forwarded properly to the
common coverage test target.

Test: TH
Bug: 278639767
Change-Id: I25c6371c64e6cfcbb48e9e3f2976d47279791f21

Patrick Rohr   commited 2023-05-25 23:36:26 -07:00
cc2e2dcb44
[Cronet] Make CtsNetHttpTestCases installable on older devices
This fixes a pre-existing failure on APCT.

Bug: 283927908
Test: atest CtsNetHttpTestCases
Change-Id: If341c11dd3e18be10f6c5e9984d1da304e655d23

Chidera Olibie   commited 2023-05-25 09:46:03 +00:00
5924d6ed0f
cronet: delete option to disable cronet in tm-mainline-prod
With the release cut of the July train and the recent automerger
cutover, tm-mainline-prod is now officially an abandoned branch.

This change deletes (most) infrastructure that was put in place to
disable cronet on tm-mainline-prod.

Test: builds
Change-Id: I078f2114b736a634f08d8f704c19beb2224ef645

Patrick Rohr   commited 2023-05-12 10:15:01 -07:00
2e3e2955b8
Stop checking for QUIC success in CTS tests
These CTS tests make use of a non-hermetic server. This means that:
* Test failures are not reproducible
* Test run are affected by the enviroment they run in (e.g., network
  configuration of the device running the tests)
Ideally we would have a local QUIC test server, but setting that up is
non-trivial. So, for the time being (while I come up with a QUIC test
server setup), simply enable QUIC and test that things keep working.

Bug: 274369142
Change-Id: Icc8b04c1671189b77f7d8995b721fb52afea371d

Stefano Duo   commited 2023-04-21 14:06:30 +01:00
50767f4260
Move cronet to framework-connectivity
aosp/2384137 added cronet to framework-tethering.
But framework-connectivity is a better place to put cronet since
cronet does not work on R devices (b/270049141) and
framework-tethering is R+, framework-connectivity is S+.

Followup CLs will move some modules (e.g. CronetJavaPrejarjarDefaults)
that use the branch dependent soong variables to framework/Android.bp

Test: TH
Bug: 278070640
Change-Id: I6bc10116759fb9e083c02147908e53022dab740a

Motomu Utsumi   commited 2023-04-19 11:32:12 +09:00
73e2e87d56
Merge "Cronet: enable CronetInputStreamTests"
Chidera Olibie   authored and   Gerrit Code Review   commited 2023-04-17 10:46:14 +00:00
f500c2ef69
Cronet: enable CronetInputStreamTests
This test needs Truth library which is part of the CronetTestJavaDefaults target
to work.

Test: atest NetHttpCoverageTests
Bug: 267353182
Change-Id: Ic3f084651af91be71832936c4fc0fdd241159198

Chidera Olibie   commited 2023-04-17 08:48:02 +00:00
9c03bf16a7
Revert "Fix symbol not found error for hidden apis used by MTS"
This reverts commit 5f44ed3e7e.

Reason for revert: The symbol not found error was a transient build failure.

Change-Id: Iada1a0bc9c2282286c1e3b972de42e6387c901d6

Chidera Olibie   commited 2023-04-13 09:38:39 +00:00
ef0074143d
Merge "[Cronet] Add framework-connectivity-t dependency for tests"
Chidera Olibie   authored and   Gerrit Code Review   commited 2023-03-30 14:11:24 +00:00
de078f0ba0
Merge "[Cronet] Add test dependency on framework-connectivity"
Chidera Olibie   authored and   Gerrit Code Review   commited 2023-03-30 13:24:45 +00:00
0fb87665b5
Merge "[Cronet] Setup QuicTestServer"
Chidera Olibie   authored and   Gerrit Code Review   commited 2023-03-30 10:22:24 +00:00
53b12e3d51
Merge "Migrate CTS test users of UploadDataProvider to a single canonical impl."
Dan Stahr   authored and   Gerrit Code Review   commited 2023-03-30 07:48:09 +00:00
045147a632
[Cronet] Add framework-connectivity-t dependency for tests
This is needed for android.net.TrafficStats dependency

Test: atest NetHttpCoverageTests
Bug: 267353182
Change-Id: Ic426a2c7844e432c6444eee56515de58b8eccb92

Chidera Olibie   commited 2023-03-29 22:47:51 +00:00
f6498e7be2