Commit Graph

6 Commits

Author SHA1 Message Date
Alexey Edelev 76c05ac9d5 Add JSON serialization support to QGrpcHttp2Channel
It's now possible to preselect the serialization format when creating
the channel using the 'Content-Type' metadata. Supported values for the
header:
 - application/grpc(default)
 - application/grpc+protobuf
 - application/grpc+json

Note: Not all servers and clients support JSON serialization format.

Task-number: QTBUG-113777
Change-Id: Ia25b3382e3addb2306acce112489ea3427687c0d
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-02-21 14:30:03 +01:00
Alexey Edelev cc54dccb64 End the native gRPC channel support
Remove the native gRPC channel implementation, respective feature and
tests.

Pick-to: 6.7
Change-Id: I71ef99746bb842d24f634ad52c77fee94edbe86f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
2024-02-12 12:23:40 +01:00
Alexey Edelev ad6c1128c0 Implement unix:// sockets support
Add the support for the UNIX sockets to QGrpcHttp2Channel. The channel
only supports the non-encrypted communicatoin.

Pick-to: 6.7
Task-number: QTBUG-119074
Change-Id: Ie404999d7511a783e4d1504a0ac51e5fc97f23ba
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
2024-02-12 08:28:01 +01:00
Alexey Edelev bc424839f1 Refactor tst_grpc_client_no_channel test
Rename the test to tst_grpc_client_deadline. Use GrpcClientTestBase
as the test base. Add WithChannelDeadline channel to GrpcClientTestBase.

Pick-to: 6.6 6.7
Change-Id: I6125f68f40b26ba645a97721641123d01a5387b2
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
2024-01-11 16:25:18 +01:00
Alexey Edelev 5189fddaed Refactor the way gRPC test are running
Add the ssl channels to tests. Run the test server with SSL channel
enabled by default.

Add the --latency option to the test server. Server now uses the value
provided by test runner instead of using the global definition.

Rename the test server-related targets, so the have grpc_ prefix now.
The previous name was too generic.

Adjust SSL tests and use GrpcClientTestBase with SslNoCredentials
channels.

Pick-to: 6.6 6.7
Task-number: QTBUG-119207
Change-Id: Ib5cf9d05db62f542f5fc9bf4de1d5af93e6864e0
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-01-11 14:29:05 +01:00
Alexey Edelev c1f9432294 Split client test into unary call and server stream tests
Add the GrpcClientTestBase class and the tst_grpc_client_test_common
library that should be used for all grpc client tests. Split the
client tests into unary call and server stream parts.

Pick-to: 6.5 6.6
Change-Id: Ia5b01f0975ebb4a368aaf9d563e3107f707fd3af
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
2023-08-29 10:53:05 +02:00