Commit Graph

52 Commits

Author SHA1 Message Date
Tanvi Jagtap a10a8c6c0e [grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging GPR_ASERT (#36224)
[grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging GPR_ASSERT
Replacing GPR_ASSERT with absl CHECK

Will not be replacing CHECK with CHECK_EQ , CHECK_NE etc because there are too many callsites. Only a few - which fit into single - line regex will be changed. This would be small in number just to reduce the load later.

Replacing CHECK with CHECK_EQ , CHECK_NE etc could be done using Cider-V once these changes are submitted if we want to clean up later. Given that we have 5000+ instances of GPR_ASSERT to edit, Doing it manually is too much work for both the author and reviewer.

<!--

If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the appropriate
lang label.

-->

Closes #36224

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36224 from tanvi-jagtap:assert_end2end_general 0b0e940f5d
PiperOrigin-RevId: 623410297
2024-04-10 01:18:20 -07:00
Alexander Polcyn 6f6f0df2ba Make TestServiceSignaller more generically useful
There are tests in another change I'm working on for which we need to do things like:

1) waiting for N RPCs to concurrently pile up on a server

2) doing 1) multiple times sequentially on the same server

PiperOrigin-RevId: 612934305
2024-03-05 12:40:05 -08:00
Craig Tiller 63c094cf5b
[promises] Run C++ end to end tests with server promises (#32537)
Expand server promises to run with C++ end2end tests.

Across connected_channel/call/batch_builder/pipe/transport:
- fix a bug where read errors weren't propagated from transport to call
so that we can populate failed_before_recv_message for the c++ bindings
- ensure those errors are not, however, used to populate the returned
call status

Add a new latch call arg to lazily propagate the bound CQ for a server
call (and client call, but here it's used degenerately - it's always
populated). This allows server calls to be properly bound to
pollsets.(1)/(2)

In call.cc:
- move some profiling code from FilterStackCall to Call, and then use it
in PromiseBasedCall (this should be cleaned up with tracing work)
- implement GetServerAuthority

In server.cc:
- use an RAII pattern on `MatchResult` to avoid a bug whereby a tag
could be dropped if we cancel a request after it's been matched but
before it's published
- fix deadline export to ServerContext

In resource_quota_server.cc:
- fix some long standing flakes (that were finally obvious with the new
test code) - it's legal here to have client calls not arrive at the
server due to resource starvation, work through that (includes adding
expectations during a `Step` call, which required some small tweaks to
cq_verifier)

In the C++ end2end_test.cc:
- strengthen a flaky test so it passes consistently (it's likely we'll
revisit this with the fuzzing efforts to strengthen it into an actually
robust test)

(1) It's time to remove this concept
(2) Surprisingly the only test that *reliably* demonstrates this not
being done is time_change_test

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-04-06 12:32:23 -07:00
Craig Tiller 67f364e23e
[cleanup] Eliminate usage of GRPC_ASSERT(false...); (#31757)
* crash function

* progress

* fix

* fix

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fixes

* Automated change: Fix sanity tests

* fix

* Automated change: Fix sanity tests

* fix

* fix

* use cpp attr

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fix

* fix

* fix

* add exclusion

* fix

* typo

* fix

* fmt

* Update tcp_socket_utils.cc

* Automated change: Fix sanity tests

* fix

* revert php changes

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-01-11 08:50:32 -08:00
Yijie Ma f99b8b5bc4
Convert c-style comments to C++-style comments (#31923)
* baseline

* fix clang-tidy

* manually revert these files

* manually fixup at eof

* revert 2 more files

* change check_deprecated_grpc++.py

* change end2end_defs.include template

* fix check_include_guards.py

* untrack tools/distrib/python/convert_cstyle_comments_to_cpp.py

not yet ready to be submitted

* fix

yapf check_include_guards.py
remove a space...

* fix version.cc.template

* fix version_info.h.template
2022-12-22 23:01:53 -08:00
Mark D. Roth 143c852d2f
end2end tests: fix test service impl to apply test slowdown factor (#30750)
* end2end tests: fix test service impl to apply test slowdown factor

* fix build
2022-08-25 14:49:42 -07:00
Mark D. Roth 65a7ce3f04
Revert "Revert "server: add method to expose authority seen by server (#29768)" (#29806)" (#29807)
This reverts commit e39e943529.
2022-05-31 14:15:45 -07:00
Mark D. Roth e39e943529
Revert "server: add method to expose authority seen by server (#29768)" (#29806)
This reverts commit 449adce98b.
2022-05-26 16:15:14 -07:00
Mark D. Roth 449adce98b
server: add method to expose authority seen by server (#29768)
* server: add method to expose authority seen by server

* Automated change: Fix sanity tests

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2022-05-26 15:03:28 -07:00
AJ Heller 85189b24bb
Reintroduce: Avoid fully qualifying namespaces (and add check) (#28917)
Based on a handful of https://abseil.io/tips, it's generally advised to
only fully-qualify namespaces when in a `using` statement, or when it's
otherwise required for compilation. In all other cases, the general
recommendation is to not fully-qualify.

This change fixes most `grpc.*` namespace uses. There are potential
challenges in trying to make blanket changes to non-gRPC namespace uses,
such as `::testing`, since there is also a `grpc::testing` namespace.
2022-02-18 16:18:54 -08:00
AJ Heller e72a5fe5dd
Revert "Avoid fully qualifying namespaces (and add check) (#28901)" (#28916)
This reverts commit fc7314c701.
2022-02-17 17:56:19 -08:00
AJ Heller fc7314c701
Avoid fully qualifying namespaces (and add check) (#28901)
Based on a handful of https://abseil.io/tips, it's generally advised to
only fully-qualify namespaces when in a `using` statement, or when it's
otherwise required for compilation. In all other cases, the general
recommendation is to not fully-qualify.

This change fixes most `grpc.*` namespace uses. There are potential
challenges in trying to make blanket changes to non-gRPC namespace uses,
such as `::testing`, since there is also a `grpc::testing` namespace.
2022-02-17 16:23:25 -08:00
Alisha Nanda 0a502d8f2e
Fix race between Read and ServerContext::IsCancelled in Sync API (#27056)
* Fix OOM issues in qps tests

* Add more verbose logging.

* Fix clang error

* Fix race between IsCancelled and Read

* Fix build errors from using bool in C code
2021-09-15 12:29:02 -07:00
Craig Tiller ea389c00c2
Adjust include order per style guide (#27175)
Introduce clang-format configuration to sort includes closer to our rules.
2021-09-08 12:14:44 -07:00
Ta-Wei Tu 7dd1da9e1d
Break after WriteLast() (#27165)
If we continue to call `Write()` after `WriteLast()` (because client is still sending us data and thus `Read()` returns `true`), the buffer might become invalid and results in assertion failures.
2021-08-27 23:19:12 +08:00
Vijay Pai 8aff94558c
De-experimentalize C++ callback API (#25728)
* De-experimentalize callback API

* Make FromServerContext based on ServerContextBase

* Fix lambda

* Fix headers

* De-experimentalize tests

* clang-format

* Fix consistency checks

* wip

* Fix const-ness of callback client read RPC requests

* Fix golden file

* Give full route_guide callback client example with Hold etc

* Complete example route-guide server

* De-experimentalize test services

* Omit unneeded using

* Remove some uses of non-experimental macro from test

* clang-format examples

* De-experimentalize async stub calls

* Remove experimental namespace use in qps, ubms

* De-experimentalize alarms, generic stubs, and context allocator

* De-experimentalize SetContextAllocator

* clang-format

* Fix conflicts

* Leave obsolete API in place until users can be migrated
2021-05-27 14:55:25 -07:00
Vijay Pai 0f80378a21
Resolve race between OnReadDone(ok=false) and IsCancelled (#26245)
* Resolve and test race between OnReadDone(ok=false) and IsCancelled

* Fix retry case

* Fix health check case

* Address reviewer comments.

* ADD TODO requested by markdroth
2021-05-19 14:05:46 -07:00
Esun Kim aae4f4cf18 Fix by misc-unused-using-decls 2020-10-19 18:12:11 -07:00
Donna Dionne e7d7b7de86 xDS circuit breaking support 2020-09-29 14:47:39 -07:00
Esun Kim 165ee5007a Replaced grpc::string with std::string 2020-06-29 17:56:36 -07:00
Donna Dionne 8bab28db08 Rearrange test_service_impl.h/cc to fix build failures. 2020-04-16 12:20:57 -07:00
Donna Dionne 71aef940c3 Code review comments: added invalid config tests and restructured
testing code.
2020-04-15 13:09:03 -07:00
Donna Dionne b39feead62 Fixing code review comments. 2020-04-14 12:42:17 -07:00
Donna Dionne 921147d1aa clang change 2020-04-14 01:02:57 -07:00
Donna Dionne 9417b28bca Fixing build issues. 2020-04-14 00:44:47 -07:00
Donna Dionne 019b206926 Fixing CR comments and build errors. 2020-04-14 00:04:31 -07:00
Donna Dionne 6ec6c24dc1 Fixing code review comments. 2020-04-13 22:16:42 -07:00
Donna Dionne 1ae804c8c0 Fixing code review comments:
- Fixing for comments in all except for test file
- Multi-purpose test_service_impl.h as oppose
to creating new files.
2020-04-11 21:39:40 -07:00
Donna Dionne f3f11cc21c Added new RPC methods to test routing different RPCs to different
backends.
2020-04-06 23:21:02 -07:00
Vijay Pai 3ade3e84a9 Make use of alarm in test service more robust 2020-01-22 10:31:25 -08:00
Vijay Pai 24483d2afd Address reviewer comments 2019-12-13 15:17:34 -08:00
Vijay Pai 9be35f74c0 Make CancelDelayedRpc test not use sleeps for client-server sync 2019-12-12 11:19:00 -08:00
Vijay Pai be6979202b Revamp server-side C++ callback API, message allocator, and mocking 2019-11-20 16:56:18 -08:00
Vijay Pai 0cb0cdb7e3 Address reviewer comments on test 2019-03-18 15:46:27 -07:00
Vijay Pai 04a6b8467c Support callback on cancellation of server-side unary RPCs 2019-03-18 12:00:57 -07:00
hcaseyal cf14bd13fb
Merge branch 'master' into callback_test_coverage_1 2018-12-03 10:16:35 -08:00
Hope Casey-Allen c12aabc6a7 Clang format 2018-12-03 10:14:46 -08:00
Vijay Pai 2a0c0d7ad6 Streaming API for callback servers 2018-11-30 16:14:21 -08:00
Hope Casey-Allen 4a6e165328 Add service definition to sync server 2018-11-30 10:26:31 -08:00
Hope Casey-Allen 470ea17843 Debugging unimplemented error in CheckClientInitialMetadata 2018-11-29 15:57:53 -08:00
Vijay Pai 84e763f10a Experimental C++ server callback unary API 2018-10-29 13:41:25 -07:00
Vijay Pai c90a85649b Change grpc++ references in names to grpcpp 2018-03-08 22:04:59 -08:00
yang-g 98cd36e2c3 Add a test 2018-01-23 11:42:10 -08:00
ncteisen 36bb8a0006 s/hanging/pending/g 2017-07-05 11:21:25 -07:00
ncteisen 9bee3086c3 Make stream responses togglable via context 2017-07-05 10:33:21 -07:00
Jan Tattermusch 7897ae9308 auto-fix most of licenses 2017-06-08 11:22:41 +02:00
Yuxuan Li 34894e4b1c Implemented stream coalescing design
(RFC:https://github.com/grpc/proposal/pull/3). Add necessary
microbenchmarks to show reduced writes/iter for short streams. Add
necessary end2end test to test out newly added apis. Filter those tests
using *WithCoalescingApi*.
2017-03-08 10:59:31 -08:00
Vijay Pai 713c7b87e1 clang-format 2016-11-01 16:33:18 -07:00
Vijay Pai c0b2acb1a0 Use C++11 final and override 2016-11-01 16:31:56 -07:00
yang-g 4c07008610 Add a test for server returning error with debug info in trailer. 2016-05-05 23:35:20 -07:00