grpc 1.67.0-x86-linux → 1.68.1-x86-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/src/ruby/ext/grpc/extconf.rb +1 -1
- data/src/ruby/ext/grpc/rb_byte_buffer.c +3 -3
- data/src/ruby/ext/grpc/rb_call.c +5 -5
- data/src/ruby/ext/grpc/rb_call_credentials.c +5 -6
- data/src/ruby/ext/grpc/rb_channel.c +6 -7
- data/src/ruby/ext/grpc/rb_channel_args.c +3 -3
- data/src/ruby/ext/grpc/rb_channel_credentials.c +5 -6
- data/src/ruby/ext/grpc/rb_channel_credentials.h +1 -2
- data/src/ruby/ext/grpc/rb_completion_queue.c +3 -4
- data/src/ruby/ext/grpc/rb_compression_options.c +6 -7
- data/src/ruby/ext/grpc/rb_event_thread.c +4 -5
- data/src/ruby/ext/grpc/rb_grpc.c +3 -4
- data/src/ruby/ext/grpc/rb_grpc.h +1 -2
- data/src/ruby/ext/grpc/rb_server.c +6 -6
- data/src/ruby/ext/grpc/rb_server_credentials.c +3 -3
- data/src/ruby/ext/grpc/rb_server_credentials.h +1 -2
- data/src/ruby/ext/grpc/rb_xds_channel_credentials.c +5 -6
- data/src/ruby/ext/grpc/rb_xds_channel_credentials.h +1 -2
- data/src/ruby/ext/grpc/rb_xds_server_credentials.c +4 -4
- data/src/ruby/ext/grpc/rb_xds_server_credentials.h +1 -2
- data/src/ruby/lib/grpc/3.0/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/3.1/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/3.2/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/3.3/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/spec/generic/client_stub_spec.rb +20 -20
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '068fb84cd6eb9fb55b75b17b49b2b131dade81f85f9c5708482558058065b424'
|
4
|
+
data.tar.gz: 4916942469f12f04ad5768d5cd5345fae2430c7432f3ac1419612cb9f239a910
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b74bef4ef7d5bf2cf94def50ece01fdeba6bc2200783eb145377f5fe024cee7656bf83ae7b626d22d0a7df37990f61e746871310522046fe8989cc725a6c43d0
|
7
|
+
data.tar.gz: f1e618310b43ff0334a1a6a9ae4ada019e1a0fb46ff33b557654f5ee2669d323b29bfa96a59ac763002b2492e35ace66586a797e3c60739d3bfa118f91c33513
|
@@ -29,7 +29,7 @@ grpc_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..'))
|
|
29
29
|
|
30
30
|
grpc_config = ENV['GRPC_CONFIG'] || 'opt'
|
31
31
|
|
32
|
-
ENV['MACOSX_DEPLOYMENT_TARGET'] = '10.
|
32
|
+
ENV['MACOSX_DEPLOYMENT_TARGET'] = '10.14'
|
33
33
|
|
34
34
|
def debug_symbols_output_dir
|
35
35
|
d = ENV['GRPC_RUBY_DEBUG_SYMBOLS_OUTPUT_DIR']
|
@@ -20,13 +20,13 @@
|
|
20
20
|
|
21
21
|
#include "rb_byte_buffer.h"
|
22
22
|
|
23
|
-
#include "rb_grpc.h"
|
24
|
-
#include "rb_grpc_imports.generated.h"
|
25
|
-
|
26
23
|
#include <grpc/byte_buffer_reader.h>
|
27
24
|
#include <grpc/grpc.h>
|
28
25
|
#include <grpc/slice.h>
|
29
26
|
|
27
|
+
#include "rb_grpc.h"
|
28
|
+
#include "rb_grpc_imports.generated.h"
|
29
|
+
|
30
30
|
grpc_byte_buffer* grpc_rb_s_to_byte_buffer(char* string, size_t length) {
|
31
31
|
grpc_slice slice = grpc_slice_from_copied_buffer(string, length);
|
32
32
|
grpc_byte_buffer* buffer = grpc_raw_byte_buffer_create(&slice, 1);
|
data/src/ruby/ext/grpc/rb_call.c
CHANGED
@@ -20,17 +20,17 @@
|
|
20
20
|
|
21
21
|
#include "rb_call.h"
|
22
22
|
|
23
|
+
#include <grpc/grpc.h>
|
24
|
+
#include <grpc/impl/codegen/compression_types.h>
|
25
|
+
#include <grpc/support/alloc.h>
|
26
|
+
#include <grpc/support/log.h>
|
27
|
+
|
23
28
|
#include "rb_byte_buffer.h"
|
24
29
|
#include "rb_call_credentials.h"
|
25
30
|
#include "rb_completion_queue.h"
|
26
31
|
#include "rb_grpc.h"
|
27
32
|
#include "rb_grpc_imports.generated.h"
|
28
33
|
|
29
|
-
#include <grpc/grpc.h>
|
30
|
-
#include <grpc/impl/codegen/compression_types.h>
|
31
|
-
#include <grpc/support/alloc.h>
|
32
|
-
#include <grpc/support/log.h>
|
33
|
-
|
34
34
|
/* grpc_rb_cCall is the Call class whose instances proxy grpc_call. */
|
35
35
|
static VALUE grpc_rb_cCall;
|
36
36
|
|
@@ -20,6 +20,11 @@
|
|
20
20
|
|
21
21
|
#include "rb_call_credentials.h"
|
22
22
|
|
23
|
+
#include <grpc/credentials.h>
|
24
|
+
#include <grpc/grpc.h>
|
25
|
+
#include <grpc/grpc_security.h>
|
26
|
+
#include <grpc/support/alloc.h>
|
27
|
+
#include <grpc/support/log.h>
|
23
28
|
#include <ruby/thread.h>
|
24
29
|
|
25
30
|
#include "rb_call.h"
|
@@ -27,12 +32,6 @@
|
|
27
32
|
#include "rb_grpc.h"
|
28
33
|
#include "rb_grpc_imports.generated.h"
|
29
34
|
|
30
|
-
#include <grpc/credentials.h>
|
31
|
-
#include <grpc/grpc.h>
|
32
|
-
#include <grpc/grpc_security.h>
|
33
|
-
#include <grpc/support/alloc.h>
|
34
|
-
#include <grpc/support/log.h>
|
35
|
-
|
36
35
|
/* grpc_rb_cCallCredentials is the ruby class that proxies
|
37
36
|
* grpc_call_credentials */
|
38
37
|
static VALUE grpc_rb_cCallCredentials = Qnil;
|
@@ -20,6 +20,12 @@
|
|
20
20
|
|
21
21
|
#include "rb_channel.h"
|
22
22
|
|
23
|
+
#include <grpc/credentials.h>
|
24
|
+
#include <grpc/grpc.h>
|
25
|
+
#include <grpc/grpc_security.h>
|
26
|
+
#include <grpc/support/alloc.h>
|
27
|
+
#include <grpc/support/log.h>
|
28
|
+
#include <grpc/support/time.h>
|
23
29
|
#include <ruby/thread.h>
|
24
30
|
|
25
31
|
#include "rb_byte_buffer.h"
|
@@ -32,13 +38,6 @@
|
|
32
38
|
#include "rb_server.h"
|
33
39
|
#include "rb_xds_channel_credentials.h"
|
34
40
|
|
35
|
-
#include <grpc/credentials.h>
|
36
|
-
#include <grpc/grpc.h>
|
37
|
-
#include <grpc/grpc_security.h>
|
38
|
-
#include <grpc/support/alloc.h>
|
39
|
-
#include <grpc/support/log.h>
|
40
|
-
#include <grpc/support/time.h>
|
41
|
-
|
42
41
|
/* id_channel is the name of the hidden ivar that preserves a reference to the
|
43
42
|
* channel on a call, so that calls are not GCed before their channel. */
|
44
43
|
static ID id_channel;
|
@@ -20,14 +20,14 @@
|
|
20
20
|
|
21
21
|
#include "rb_channel_args.h"
|
22
22
|
|
23
|
-
#include "rb_grpc.h"
|
24
|
-
#include "rb_grpc_imports.generated.h"
|
25
|
-
|
26
23
|
#include <grpc/grpc.h>
|
27
24
|
#include <grpc/support/alloc.h>
|
28
25
|
#include <grpc/support/log.h>
|
29
26
|
#include <grpc/support/string_util.h>
|
30
27
|
|
28
|
+
#include "rb_grpc.h"
|
29
|
+
#include "rb_grpc_imports.generated.h"
|
30
|
+
|
31
31
|
static rb_data_type_t grpc_rb_channel_args_data_type = {
|
32
32
|
"grpc_channel_args",
|
33
33
|
{GRPC_RB_GC_NOT_MARKED,
|
@@ -20,17 +20,16 @@
|
|
20
20
|
|
21
21
|
#include "rb_channel_credentials.h"
|
22
22
|
|
23
|
-
#include <string.h>
|
24
|
-
|
25
|
-
#include "rb_call_credentials.h"
|
26
|
-
#include "rb_grpc.h"
|
27
|
-
#include "rb_grpc_imports.generated.h"
|
28
|
-
|
29
23
|
#include <grpc/credentials.h>
|
30
24
|
#include <grpc/grpc.h>
|
31
25
|
#include <grpc/grpc_security.h>
|
32
26
|
#include <grpc/support/alloc.h>
|
33
27
|
#include <grpc/support/log.h>
|
28
|
+
#include <string.h>
|
29
|
+
|
30
|
+
#include "rb_call_credentials.h"
|
31
|
+
#include "rb_grpc.h"
|
32
|
+
#include "rb_grpc_imports.generated.h"
|
34
33
|
|
35
34
|
/* grpc_rb_cChannelCredentials is the ruby class that proxies
|
36
35
|
grpc_channel_credentials. */
|
@@ -20,15 +20,14 @@
|
|
20
20
|
|
21
21
|
#include "rb_completion_queue.h"
|
22
22
|
|
23
|
+
#include <grpc/grpc.h>
|
24
|
+
#include <grpc/support/log.h>
|
25
|
+
#include <grpc/support/time.h>
|
23
26
|
#include <ruby/thread.h>
|
24
27
|
|
25
28
|
#include "rb_grpc.h"
|
26
29
|
#include "rb_grpc_imports.generated.h"
|
27
30
|
|
28
|
-
#include <grpc/grpc.h>
|
29
|
-
#include <grpc/support/log.h>
|
30
|
-
#include <grpc/support/time.h>
|
31
|
-
|
32
31
|
/* Used to allow grpc_completion_queue_next call to release the GIL */
|
33
32
|
typedef struct next_call_stack {
|
34
33
|
grpc_completion_queue* cq;
|
@@ -20,12 +20,6 @@
|
|
20
20
|
|
21
21
|
#include "rb_compression_options.h"
|
22
22
|
|
23
|
-
#include <string.h>
|
24
|
-
|
25
|
-
#include "rb_byte_buffer.h"
|
26
|
-
#include "rb_grpc.h"
|
27
|
-
#include "rb_grpc_imports.generated.h"
|
28
|
-
|
29
23
|
#include <grpc/compression.h>
|
30
24
|
#include <grpc/grpc.h>
|
31
25
|
#include <grpc/impl/codegen/compression_types.h>
|
@@ -33,6 +27,11 @@
|
|
33
27
|
#include <grpc/support/alloc.h>
|
34
28
|
#include <grpc/support/log.h>
|
35
29
|
#include <grpc/support/string_util.h>
|
30
|
+
#include <string.h>
|
31
|
+
|
32
|
+
#include "rb_byte_buffer.h"
|
33
|
+
#include "rb_grpc.h"
|
34
|
+
#include "rb_grpc_imports.generated.h"
|
36
35
|
|
37
36
|
static VALUE grpc_rb_cCompressionOptions = Qnil;
|
38
37
|
|
@@ -296,7 +295,7 @@ VALUE grpc_rb_compression_options_level_value_to_name_internal(
|
|
296
295
|
* Fails if the enum value is invalid. */
|
297
296
|
VALUE grpc_rb_compression_options_algorithm_value_to_name_internal(
|
298
297
|
grpc_compression_algorithm internal_value) {
|
299
|
-
char* algorithm_name = NULL;
|
298
|
+
const char* algorithm_name = NULL;
|
300
299
|
|
301
300
|
if (!grpc_compression_algorithm_name(internal_value, &algorithm_name)) {
|
302
301
|
rb_raise(rb_eArgError, "Failed to convert algorithm value to name");
|
@@ -20,17 +20,16 @@
|
|
20
20
|
|
21
21
|
#include "rb_event_thread.h"
|
22
22
|
|
23
|
+
#include <grpc/support/alloc.h>
|
24
|
+
#include <grpc/support/log.h>
|
25
|
+
#include <grpc/support/sync.h>
|
26
|
+
#include <grpc/support/time.h>
|
23
27
|
#include <ruby/thread.h>
|
24
28
|
#include <stdbool.h>
|
25
29
|
|
26
30
|
#include "rb_grpc.h"
|
27
31
|
#include "rb_grpc_imports.generated.h"
|
28
32
|
|
29
|
-
#include <grpc/support/alloc.h>
|
30
|
-
#include <grpc/support/log.h>
|
31
|
-
#include <grpc/support/sync.h>
|
32
|
-
#include <grpc/support/time.h>
|
33
|
-
|
34
33
|
typedef struct grpc_rb_event {
|
35
34
|
// callback will be called with argument while holding the GVL
|
36
35
|
void (*callback)(void*);
|
data/src/ruby/ext/grpc/rb_grpc.c
CHANGED
@@ -20,6 +20,9 @@
|
|
20
20
|
|
21
21
|
#include "rb_grpc.h"
|
22
22
|
|
23
|
+
#include <grpc/grpc.h>
|
24
|
+
#include <grpc/support/log.h>
|
25
|
+
#include <grpc/support/time.h>
|
23
26
|
#include <math.h>
|
24
27
|
#include <ruby/vm.h>
|
25
28
|
#include <stdbool.h>
|
@@ -39,10 +42,6 @@
|
|
39
42
|
#include "rb_xds_channel_credentials.h"
|
40
43
|
#include "rb_xds_server_credentials.h"
|
41
44
|
|
42
|
-
#include <grpc/grpc.h>
|
43
|
-
#include <grpc/support/log.h>
|
44
|
-
#include <grpc/support/time.h>
|
45
|
-
|
46
45
|
#ifdef GPR_LINUX
|
47
46
|
#include <sys/syscall.h>
|
48
47
|
#include <unistd.h>
|
data/src/ruby/ext/grpc/rb_grpc.h
CHANGED
@@ -20,6 +20,12 @@
|
|
20
20
|
|
21
21
|
#include "rb_server.h"
|
22
22
|
|
23
|
+
#include <grpc/credentials.h>
|
24
|
+
#include <grpc/grpc.h>
|
25
|
+
#include <grpc/grpc_security.h>
|
26
|
+
#include <grpc/support/atm.h>
|
27
|
+
#include <grpc/support/log.h>
|
28
|
+
|
23
29
|
#include "rb_byte_buffer.h"
|
24
30
|
#include "rb_call.h"
|
25
31
|
#include "rb_channel_args.h"
|
@@ -29,12 +35,6 @@
|
|
29
35
|
#include "rb_server_credentials.h"
|
30
36
|
#include "rb_xds_server_credentials.h"
|
31
37
|
|
32
|
-
#include <grpc/credentials.h>
|
33
|
-
#include <grpc/grpc.h>
|
34
|
-
#include <grpc/grpc_security.h>
|
35
|
-
#include <grpc/support/atm.h>
|
36
|
-
#include <grpc/support/log.h>
|
37
|
-
|
38
38
|
/* grpc_rb_cServer is the ruby class that proxies grpc_server. */
|
39
39
|
static VALUE grpc_rb_cServer = Qnil;
|
40
40
|
|
@@ -20,14 +20,14 @@
|
|
20
20
|
|
21
21
|
#include "rb_server_credentials.h"
|
22
22
|
|
23
|
-
#include "rb_grpc.h"
|
24
|
-
#include "rb_grpc_imports.generated.h"
|
25
|
-
|
26
23
|
#include <grpc/credentials.h>
|
27
24
|
#include <grpc/grpc.h>
|
28
25
|
#include <grpc/grpc_security.h>
|
29
26
|
#include <grpc/support/log.h>
|
30
27
|
|
28
|
+
#include "rb_grpc.h"
|
29
|
+
#include "rb_grpc_imports.generated.h"
|
30
|
+
|
31
31
|
/* grpc_rb_cServerCredentials is the ruby class that proxies
|
32
32
|
grpc_server_credentials. */
|
33
33
|
static VALUE grpc_rb_cServerCredentials = Qnil;
|
@@ -20,6 +20,11 @@
|
|
20
20
|
|
21
21
|
#include "rb_xds_channel_credentials.h"
|
22
22
|
|
23
|
+
#include <grpc/credentials.h>
|
24
|
+
#include <grpc/grpc.h>
|
25
|
+
#include <grpc/grpc_security.h>
|
26
|
+
#include <grpc/support/alloc.h>
|
27
|
+
#include <grpc/support/log.h>
|
23
28
|
#include <string.h>
|
24
29
|
|
25
30
|
#include "rb_call_credentials.h"
|
@@ -27,12 +32,6 @@
|
|
27
32
|
#include "rb_grpc.h"
|
28
33
|
#include "rb_grpc_imports.generated.h"
|
29
34
|
|
30
|
-
#include <grpc/credentials.h>
|
31
|
-
#include <grpc/grpc.h>
|
32
|
-
#include <grpc/grpc_security.h>
|
33
|
-
#include <grpc/support/alloc.h>
|
34
|
-
#include <grpc/support/log.h>
|
35
|
-
|
36
35
|
/* grpc_rb_cXdsChannelCredentials is the ruby class that proxies
|
37
36
|
grpc_channel_credentials. */
|
38
37
|
static VALUE grpc_rb_cXdsChannelCredentials = Qnil;
|
@@ -20,15 +20,15 @@
|
|
20
20
|
|
21
21
|
#include "rb_xds_server_credentials.h"
|
22
22
|
|
23
|
-
#include "rb_grpc.h"
|
24
|
-
#include "rb_grpc_imports.generated.h"
|
25
|
-
#include "rb_server_credentials.h"
|
26
|
-
|
27
23
|
#include <grpc/credentials.h>
|
28
24
|
#include <grpc/grpc.h>
|
29
25
|
#include <grpc/grpc_security.h>
|
30
26
|
#include <grpc/support/log.h>
|
31
27
|
|
28
|
+
#include "rb_grpc.h"
|
29
|
+
#include "rb_grpc_imports.generated.h"
|
30
|
+
#include "rb_server_credentials.h"
|
31
|
+
|
32
32
|
/* grpc_rb_cXdsServerCredentials is the ruby class that proxies
|
33
33
|
grpc_server_credentials. */
|
34
34
|
static VALUE grpc_rb_cXdsServerCredentials = Qnil;
|
@@ -21,10 +21,9 @@
|
|
21
21
|
|
22
22
|
#include <ruby/ruby.h>
|
23
23
|
|
24
|
-
#include <stdbool.h>
|
25
|
-
|
26
24
|
#include <grpc/credentials.h>
|
27
25
|
#include <grpc/grpc_security.h>
|
26
|
+
#include <stdbool.h>
|
28
27
|
|
29
28
|
/* Initializes the ruby XdsServerCredentials class. */
|
30
29
|
void Init_grpc_xds_server_credentials();
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -453,23 +453,23 @@ describe 'ClientStub' do # rubocop:disable Metrics/BlockLength
|
|
453
453
|
describe '#server_streamer', server_streamer: true do
|
454
454
|
before(:each) do
|
455
455
|
@sent_msg = 'a_msg'
|
456
|
-
@
|
456
|
+
@replies = Array.new(3) { |i| 'reply_' + (i + 1).to_s }
|
457
457
|
end
|
458
458
|
|
459
459
|
shared_examples 'server streaming' do
|
460
460
|
it 'should send a request to/receive replies from a server' do
|
461
461
|
server_port = create_test_server
|
462
462
|
host = "localhost:#{server_port}"
|
463
|
-
th = run_server_streamer(@sent_msg, @
|
463
|
+
th = run_server_streamer(@sent_msg, @replies, @pass)
|
464
464
|
stub = GRPC::ClientStub.new(host, :this_channel_is_insecure)
|
465
|
-
expect(get_responses(stub).collect { |r| r }).to eq(@
|
465
|
+
expect(get_responses(stub).collect { |r| r }).to eq(@replies)
|
466
466
|
th.join
|
467
467
|
end
|
468
468
|
|
469
469
|
it 'should raise an error if the status is not ok' do
|
470
470
|
server_port = create_test_server
|
471
471
|
host = "localhost:#{server_port}"
|
472
|
-
th = run_server_streamer(@sent_msg, @
|
472
|
+
th = run_server_streamer(@sent_msg, @replies, @fail)
|
473
473
|
stub = GRPC::ClientStub.new(host, :this_channel_is_insecure)
|
474
474
|
e = get_responses(stub)
|
475
475
|
expect { e.collect { |r| r } }.to raise_error(GRPC::BadStatus)
|
@@ -479,7 +479,7 @@ describe 'ClientStub' do # rubocop:disable Metrics/BlockLength
|
|
479
479
|
it 'should send metadata to the server ok' do
|
480
480
|
server_port = create_test_server
|
481
481
|
host = "localhost:#{server_port}"
|
482
|
-
th = run_server_streamer(@sent_msg, @
|
482
|
+
th = run_server_streamer(@sent_msg, @replies, @fail,
|
483
483
|
expected_metadata: { k1: 'v1', k2: 'v2' })
|
484
484
|
stub = GRPC::ClientStub.new(host, :this_channel_is_insecure)
|
485
485
|
e = get_responses(stub)
|
@@ -502,7 +502,7 @@ describe 'ClientStub' do # rubocop:disable Metrics/BlockLength
|
|
502
502
|
server_port = create_test_server
|
503
503
|
host = "localhost:#{server_port}"
|
504
504
|
th = run_server_streamer_handle_client_cancellation(
|
505
|
-
@sent_msg, @
|
505
|
+
@sent_msg, @replies)
|
506
506
|
stub = GRPC::ClientStub.new(host, :this_channel_is_insecure)
|
507
507
|
|
508
508
|
unmarshal = proc { fail(ArgumentError, 'test unmarshalling error') }
|
@@ -547,13 +547,13 @@ describe 'ClientStub' do # rubocop:disable Metrics/BlockLength
|
|
547
547
|
@server_initial_md = { 'sk1' => 'sv1', 'sk2' => 'sv2' }
|
548
548
|
@server_trailing_md = { 'tk1' => 'tv1', 'tk2' => 'tv2' }
|
549
549
|
th = run_server_streamer(
|
550
|
-
@sent_msg, @
|
550
|
+
@sent_msg, @replies, @pass,
|
551
551
|
expected_metadata: @metadata,
|
552
552
|
server_initial_md: @server_initial_md,
|
553
553
|
server_trailing_md: @server_trailing_md)
|
554
554
|
stub = GRPC::ClientStub.new(host, :this_channel_is_insecure)
|
555
555
|
e = get_responses(stub, run_start_call_first: run_start_call_first)
|
556
|
-
expect(e.collect { |r| r }).to eq(@
|
556
|
+
expect(e.collect { |r| r }).to eq(@replies)
|
557
557
|
th.join
|
558
558
|
end
|
559
559
|
|
@@ -577,7 +577,7 @@ describe 'ClientStub' do # rubocop:disable Metrics/BlockLength
|
|
577
577
|
server_port = create_test_server
|
578
578
|
host = "localhost:#{server_port}"
|
579
579
|
th = run_server_streamer_handle_client_cancellation(
|
580
|
-
@sent_msg, @
|
580
|
+
@sent_msg, @replies)
|
581
581
|
stub = GRPC::ClientStub.new(host, :this_channel_is_insecure)
|
582
582
|
resp = get_responses(stub, run_start_call_first: false)
|
583
583
|
expect(resp.next).to eq('reply_1')
|
@@ -591,18 +591,18 @@ describe 'ClientStub' do # rubocop:disable Metrics/BlockLength
|
|
591
591
|
describe '#bidi_streamer', bidi: true do
|
592
592
|
before(:each) do
|
593
593
|
@sent_msgs = Array.new(3) { |i| 'msg_' + (i + 1).to_s }
|
594
|
-
@
|
594
|
+
@replies = Array.new(3) { |i| 'reply_' + (i + 1).to_s }
|
595
595
|
server_port = create_test_server
|
596
596
|
@host = "localhost:#{server_port}"
|
597
597
|
end
|
598
598
|
|
599
599
|
shared_examples 'bidi streaming' do
|
600
600
|
it 'supports sending all the requests first' do
|
601
|
-
th = run_bidi_streamer_handle_inputs_first(@sent_msgs, @
|
601
|
+
th = run_bidi_streamer_handle_inputs_first(@sent_msgs, @replies,
|
602
602
|
@pass)
|
603
603
|
stub = GRPC::ClientStub.new(@host, :this_channel_is_insecure)
|
604
604
|
e = get_responses(stub)
|
605
|
-
expect(e.collect { |r| r }).to eq(@
|
605
|
+
expect(e.collect { |r| r }).to eq(@replies)
|
606
606
|
th.join
|
607
607
|
end
|
608
608
|
|
@@ -724,7 +724,7 @@ describe 'ClientStub' do # rubocop:disable Metrics/BlockLength
|
|
724
724
|
requests_to_push,
|
725
725
|
request_queue,
|
726
726
|
expected_error_message)
|
727
|
-
# the write loop
|
727
|
+
# the write loop error should cancel the call and end the
|
728
728
|
# server's request stream
|
729
729
|
th.join
|
730
730
|
end
|
@@ -777,7 +777,7 @@ describe 'ClientStub' do # rubocop:disable Metrics/BlockLength
|
|
777
777
|
|
778
778
|
it 'receives a grpc status code when writes to a bidi stream fail' do
|
779
779
|
# This test tries to trigger the case when a 'SEND_MESSAGE' op
|
780
|
-
# and
|
780
|
+
# and subsequent 'SEND_CLOSE_FROM_CLIENT' op of a bidi stream fails.
|
781
781
|
# In this case, iteration through the response stream should result
|
782
782
|
# in a grpc status code, and the writer thread should not raise an
|
783
783
|
# exception.
|
@@ -942,7 +942,7 @@ describe 'ClientStub' do # rubocop:disable Metrics/BlockLength
|
|
942
942
|
end
|
943
943
|
end
|
944
944
|
|
945
|
-
def run_server_streamer(expected_input,
|
945
|
+
def run_server_streamer(expected_input, replies, status,
|
946
946
|
expected_metadata: {},
|
947
947
|
server_initial_md: {},
|
948
948
|
server_trailing_md: {})
|
@@ -954,19 +954,19 @@ describe 'ClientStub' do # rubocop:disable Metrics/BlockLength
|
|
954
954
|
expect(c.metadata[k.to_s]).to eq(v)
|
955
955
|
end
|
956
956
|
expect(c.remote_read).to eq(expected_input)
|
957
|
-
|
957
|
+
replies.each { |r| c.remote_send(r) }
|
958
958
|
c.send_status(status, status == @pass ? 'OK' : 'NOK', true,
|
959
959
|
metadata: server_trailing_md)
|
960
960
|
close_active_server_call(c)
|
961
961
|
end
|
962
962
|
end
|
963
963
|
|
964
|
-
def run_bidi_streamer_handle_inputs_first(expected_inputs,
|
964
|
+
def run_bidi_streamer_handle_inputs_first(expected_inputs, replies,
|
965
965
|
status)
|
966
966
|
wakey_thread do |notifier|
|
967
967
|
c = expect_server_to_be_invoked(notifier)
|
968
968
|
expected_inputs.each { |i| expect(c.remote_read).to eq(i) }
|
969
|
-
|
969
|
+
replies.each { |r| c.remote_send(r) }
|
970
970
|
c.send_status(status, status == @pass ? 'OK' : 'NOK', true)
|
971
971
|
close_active_server_call(c)
|
972
972
|
end
|
@@ -1018,12 +1018,12 @@ describe 'ClientStub' do # rubocop:disable Metrics/BlockLength
|
|
1018
1018
|
end
|
1019
1019
|
|
1020
1020
|
def run_server_streamer_handle_client_cancellation(
|
1021
|
-
expected_input,
|
1021
|
+
expected_input, replies)
|
1022
1022
|
wakey_thread do |notifier|
|
1023
1023
|
c = expect_server_to_be_invoked(notifier)
|
1024
1024
|
expect(c.remote_read).to eq(expected_input)
|
1025
1025
|
begin
|
1026
|
-
|
1026
|
+
replies.each { |r| c.remote_send(r) }
|
1027
1027
|
rescue GRPC::Core::CallError
|
1028
1028
|
# An attempt to write to the client might fail. This is ok
|
1029
1029
|
# because the client call is expected to cancel the call,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grpc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.68.1
|
5
5
|
platform: x86-linux
|
6
6
|
authors:
|
7
7
|
- gRPC Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: src/ruby/bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -359,7 +359,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
359
359
|
- !ruby/object:Gem::Version
|
360
360
|
version: '0'
|
361
361
|
requirements: []
|
362
|
-
rubygems_version: 3.5.
|
362
|
+
rubygems_version: 3.5.23
|
363
363
|
signing_key:
|
364
364
|
specification_version: 4
|
365
365
|
summary: GRPC system in Ruby
|