grpc/src/ruby/spec
Stan Hu 489d24cf7e [ruby] Make `GRPC::DeadlineExceeded` report properly (#33565)
In grpc v1.46.2 and later versions, #29155 caused the Ruby client to return `GRPC::Core::CallError`, a non-standard error, with a message: `grpc_call_start_batch failed with outstanding read or write present (code=8)`. However, the actual error should have been `GRPC::DeadlineExceeded`. This occurred because when `GRPC::DeadlineExceeded` is raised, the `@metadata_received` flag doesn't get flipped. When `receive_and_check_status` runs to determine
the error, the `RECV_INITIAL_METADATA` is erroneously sent again.

To avoid this, flip the flag in an `ensure` block whenever the `RECV_INITIAL_METADATA` op is set.

Closes #33283

Closes #33565

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/33565 from stanhu:sh-ruby-fix-issue-33283 850889558c
PiperOrigin-RevId: 614088694
2024-03-08 17:20:56 -08:00
..
generic [ruby] Make `GRPC::DeadlineExceeded` report properly (#33565) 2024-03-08 17:20:56 -08:00
pb build protoc artifacts with cmake 2020-12-09 11:54:44 +01:00
support Fix use-after-free in ruby call creds 2020-06-26 13:26:54 -07:00
testdata Revert "Append old ca.pem" 2020-03-20 16:49:15 -07:00
call_credentials_spec.rb All spec files require spec_helper 2018-06-18 12:12:21 +09:00
call_spec.rb Replace disrespectful term 2021-02-08 15:29:53 -08:00
channel_connection_spec.rb Disable soreuseport in ruby unit tests 2017-12-13 16:43:00 -08:00
channel_credentials_spec.rb Ruby: support for PSM security (#25330) 2021-03-04 13:32:30 -08:00
channel_spec.rb ruby: remove tests that try to assert a certain behabior after forking (#31353) 2022-10-17 11:53:17 -07:00
client_auth_spec.rb Ruby: support for PSM security (#25330) 2021-03-04 13:32:30 -08:00
client_server_spec.rb [surface] Ensure SEND_STATUS & RECV_MESSAGE do not inhabit the same batch (#31554) 2022-11-11 14:18:29 -08:00
compression_options_spec.rb All spec files require spec_helper 2018-06-18 12:12:21 +09:00
debug_message_spec.rb plumb recv_stats_op error_string field up to the ruby surface 2020-05-12 18:23:22 -07:00
error_sanity_spec.rb All spec files require spec_helper 2018-06-18 12:12:21 +09:00
errors_spec.rb Relax ruby test check on protobuf error message (#25507) 2021-02-19 15:54:06 -08:00
google_rpc_status_utils_spec.rb fix some spelling mistakes in document 2019-10-04 09:07:35 +08:00
server_credentials_spec.rb Ruby: support for PSM security (#25330) 2021-03-04 13:32:30 -08:00
server_spec.rb Ruby: support for PSM security (#25330) 2021-03-04 13:32:30 -08:00
spec_helper.rb spec_helper requires grpc 2018-06-18 12:04:30 +09:00
time_consts_spec.rb All spec files require spec_helper 2018-06-18 12:12:21 +09:00
user_agent_spec.rb make ruby unit tests work on ruby 3 (#30603) 2022-08-17 11:20:53 -07:00