grpc 1.50.0.pre1-x64-mingw-ucrt → 1.52.0.pre2-x64-mingw-ucrt
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of grpc might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/grpc_c.64-ucrt.ruby +0 -0
- data/src/ruby/ext/grpc/{ext-export-truffleruby.clang → ext-export-truffleruby-with-ruby-abi-version.clang} +0 -0
- data/src/ruby/ext/grpc/{ext-export-truffleruby.gcc → ext-export-truffleruby-with-ruby-abi-version.gcc} +0 -0
- data/src/ruby/ext/grpc/ext-export-with-ruby-abi-version.clang +2 -0
- data/src/ruby/ext/grpc/ext-export-with-ruby-abi-version.gcc +7 -0
- data/src/ruby/ext/grpc/ext-export.clang +0 -1
- data/src/ruby/ext/grpc/ext-export.gcc +1 -2
- data/src/ruby/ext/grpc/extconf.rb +47 -2
- data/src/ruby/ext/grpc/rb_call.c +1 -0
- data/src/ruby/ext/grpc/rb_channel.c +1 -0
- data/src/ruby/ext/grpc/rb_channel_args.c +1 -0
- data/src/ruby/ext/grpc/rb_compression_options.c +1 -1
- data/src/ruby/ext/grpc/rb_grpc.c +1 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +38 -38
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +59 -59
- 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/generic/bidi_call.rb +2 -0
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/spec/channel_spec.rb +0 -43
- data/src/ruby/spec/client_server_spec.rb +20 -8
- data/src/ruby/spec/generic/active_call_spec.rb +12 -3
- metadata +23 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c24c120b8831329af8ed394269157c8f6bc4017d0b3c5237f46a1fd7e84eced
|
4
|
+
data.tar.gz: eb2810cc4559679aeb1b9ad543f66d885e1d1070eb21a7149c330c4b0f254c81
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e72856155488bc08b4f8cdfc7e11f731213dcfc7960fb1241c3aa2942669d33586e6192498aa75bdbada855b9737d97b170659104ec1c4ffe193771f6a94da5d
|
7
|
+
data.tar.gz: db36c02fafcd274144a9f8ab890bd716c3d6ebff47cb73e9357193c124b60246a74cf137534b44a33cb6ad8004c8334fd8cc5b37da09b6cd9a60755cedc059fa
|
data/grpc_c.64-ucrt.ruby
CHANGED
Binary file
|
File without changes
|
File without changes
|
@@ -113,8 +113,34 @@ end
|
|
113
113
|
$CFLAGS << ' -DGRPC_RUBY_WINDOWS_UCRT' if windows_ucrt
|
114
114
|
$CFLAGS << ' -I' + File.join(grpc_root, 'include')
|
115
115
|
|
116
|
-
|
117
|
-
|
116
|
+
def have_ruby_abi_version()
|
117
|
+
return true if RUBY_ENGINE == 'truffleruby'
|
118
|
+
# ruby_abi_version is only available in development versions: https://github.com/ruby/ruby/pull/6231
|
119
|
+
return false if RUBY_PATCHLEVEL >= 0
|
120
|
+
|
121
|
+
m = /(\d+)\.(\d+)/.match(RUBY_VERSION)
|
122
|
+
if m.nil?
|
123
|
+
puts "Failed to parse ruby version: #{RUBY_VERSION}. Assuming ruby_abi_version symbol is NOT present."
|
124
|
+
return false
|
125
|
+
end
|
126
|
+
major = m[1].to_i
|
127
|
+
minor = m[2].to_i
|
128
|
+
if major >= 3 and minor >= 2
|
129
|
+
puts "Ruby version #{RUBY_VERSION} >= 3.2. Assuming ruby_abi_version symbol is present."
|
130
|
+
return true
|
131
|
+
end
|
132
|
+
puts "Ruby version #{RUBY_VERSION} < 3.2. Assuming ruby_abi_version symbol is NOT present."
|
133
|
+
false
|
134
|
+
end
|
135
|
+
|
136
|
+
def ext_export_filename()
|
137
|
+
name = 'ext-export'
|
138
|
+
name += '-truffleruby' if RUBY_ENGINE == 'truffleruby'
|
139
|
+
name += '-with-ruby-abi-version' if have_ruby_abi_version()
|
140
|
+
name
|
141
|
+
end
|
142
|
+
|
143
|
+
ext_export_file = File.join(grpc_root, 'src', 'ruby', 'ext', 'grpc', ext_export_filename())
|
118
144
|
$LDFLAGS << ' -Wl,--version-script="' + ext_export_file + '.gcc"' if linux
|
119
145
|
$LDFLAGS << ' -Wl,-exported_symbols_list,"' + ext_export_file + '.clang"' if apple_toolchain
|
120
146
|
|
@@ -161,3 +187,22 @@ if grpc_config == 'opt'
|
|
161
187
|
end
|
162
188
|
File.rename('Makefile.new', 'Makefile')
|
163
189
|
end
|
190
|
+
if ENV['GRPC_RUBY_TEST_ONLY_WORKAROUND_MAKE_INSTALL_BUG']
|
191
|
+
# Note: this env var setting is intended to work around a problem observed
|
192
|
+
# with the ginstall command on grpc's macos automated test infrastructure,
|
193
|
+
# and is not guaranteed to work in the wild.
|
194
|
+
# Also see https://github.com/rake-compiler/rake-compiler/issues/210.
|
195
|
+
puts 'Overriding the generated Makefile install target to use cp'
|
196
|
+
File.open('Makefile.new', 'w') do |o|
|
197
|
+
File.foreach('Makefile') do |i|
|
198
|
+
if i.start_with?('INSTALL_PROG = ')
|
199
|
+
override = 'INSTALL_PROG = cp'
|
200
|
+
puts "Replacing generated Makefile line: |#{i}|, with: |#{override}|"
|
201
|
+
o.puts override
|
202
|
+
else
|
203
|
+
o.puts i
|
204
|
+
end
|
205
|
+
end
|
206
|
+
end
|
207
|
+
File.rename('Makefile.new', 'Makefile')
|
208
|
+
end
|
data/src/ruby/ext/grpc/rb_call.c
CHANGED
@@ -973,6 +973,7 @@ void Init_grpc_call() {
|
|
973
973
|
grpc_rb_cCall = rb_define_class_under(grpc_rb_mGrpcCore, "Call", rb_cObject);
|
974
974
|
grpc_rb_cMdAry =
|
975
975
|
rb_define_class_under(grpc_rb_mGrpcCore, "MetadataArray", rb_cObject);
|
976
|
+
rb_undef_alloc_func(grpc_rb_cMdAry);
|
976
977
|
|
977
978
|
/* Prevent allocation or inialization of the Call class */
|
978
979
|
rb_define_alloc_func(grpc_rb_cCall, grpc_rb_cannot_alloc);
|
@@ -804,6 +804,7 @@ static void Init_grpc_connectivity_states() {
|
|
804
804
|
|
805
805
|
void Init_grpc_channel() {
|
806
806
|
grpc_rb_cChannelArgs = rb_define_class("TmpChannelArgs", rb_cObject);
|
807
|
+
rb_undef_alloc_func(grpc_rb_cChannelArgs);
|
807
808
|
grpc_rb_cChannel =
|
808
809
|
rb_define_class_under(grpc_rb_mGrpcCore, "Channel", rb_cObject);
|
809
810
|
|
@@ -111,6 +111,7 @@ typedef struct channel_convert_params {
|
|
111
111
|
static VALUE grpc_rb_hash_convert_to_channel_args0(VALUE as_value) {
|
112
112
|
ID id_size = rb_intern("size");
|
113
113
|
VALUE grpc_rb_cChannelArgs = rb_define_class("TmpChannelArgs", rb_cObject);
|
114
|
+
rb_undef_alloc_func(grpc_rb_cChannelArgs);
|
114
115
|
channel_convert_params* params = (channel_convert_params*)as_value;
|
115
116
|
size_t num_args = 0;
|
116
117
|
|
@@ -29,7 +29,7 @@
|
|
29
29
|
#include <grpc/compression.h>
|
30
30
|
#include <grpc/grpc.h>
|
31
31
|
#include <grpc/impl/codegen/compression_types.h>
|
32
|
-
#include <grpc/impl/
|
32
|
+
#include <grpc/impl/grpc_types.h>
|
33
33
|
#include <grpc/support/alloc.h>
|
34
34
|
#include <grpc/support/log.h>
|
35
35
|
#include <grpc/support/string_util.h>
|
data/src/ruby/ext/grpc/rb_grpc.c
CHANGED
@@ -198,6 +198,7 @@ static void Init_grpc_time_consts() {
|
|
198
198
|
rb_define_module_under(grpc_rb_mGrpcCore, "TimeConsts");
|
199
199
|
grpc_rb_cTimeVal =
|
200
200
|
rb_define_class_under(grpc_rb_mGrpcCore, "TimeSpec", rb_cObject);
|
201
|
+
rb_undef_alloc_func(grpc_rb_cTimeVal);
|
201
202
|
zero_realtime = gpr_time_0(GPR_CLOCK_REALTIME);
|
202
203
|
inf_future_realtime = gpr_inf_future(GPR_CLOCK_REALTIME);
|
203
204
|
inf_past_realtime = gpr_inf_past(GPR_CLOCK_REALTIME);
|
@@ -22,6 +22,17 @@
|
|
22
22
|
|
23
23
|
#include "rb_grpc_imports.generated.h"
|
24
24
|
|
25
|
+
grpc_raw_byte_buffer_create_type grpc_raw_byte_buffer_create_import;
|
26
|
+
grpc_raw_compressed_byte_buffer_create_type grpc_raw_compressed_byte_buffer_create_import;
|
27
|
+
grpc_byte_buffer_copy_type grpc_byte_buffer_copy_import;
|
28
|
+
grpc_byte_buffer_length_type grpc_byte_buffer_length_import;
|
29
|
+
grpc_byte_buffer_destroy_type grpc_byte_buffer_destroy_import;
|
30
|
+
grpc_byte_buffer_reader_init_type grpc_byte_buffer_reader_init_import;
|
31
|
+
grpc_byte_buffer_reader_destroy_type grpc_byte_buffer_reader_destroy_import;
|
32
|
+
grpc_byte_buffer_reader_next_type grpc_byte_buffer_reader_next_import;
|
33
|
+
grpc_byte_buffer_reader_peek_type grpc_byte_buffer_reader_peek_import;
|
34
|
+
grpc_byte_buffer_reader_readall_type grpc_byte_buffer_reader_readall_import;
|
35
|
+
grpc_raw_byte_buffer_from_reader_type grpc_raw_byte_buffer_from_reader_import;
|
25
36
|
grpc_compression_algorithm_is_message_type grpc_compression_algorithm_is_message_import;
|
26
37
|
grpc_compression_algorithm_is_stream_type grpc_compression_algorithm_is_stream_import;
|
27
38
|
grpc_compression_algorithm_parse_type grpc_compression_algorithm_parse_import;
|
@@ -35,7 +46,6 @@ grpc_metadata_array_init_type grpc_metadata_array_init_import;
|
|
35
46
|
grpc_metadata_array_destroy_type grpc_metadata_array_destroy_import;
|
36
47
|
grpc_call_details_init_type grpc_call_details_init_import;
|
37
48
|
grpc_call_details_destroy_type grpc_call_details_destroy_import;
|
38
|
-
grpc_register_plugin_type grpc_register_plugin_import;
|
39
49
|
grpc_init_type grpc_init_import;
|
40
50
|
grpc_shutdown_type grpc_shutdown_import;
|
41
51
|
grpc_is_initialized_type grpc_is_initialized_import;
|
@@ -187,24 +197,6 @@ grpc_authorization_policy_provider_static_data_create_type grpc_authorization_po
|
|
187
197
|
grpc_authorization_policy_provider_file_watcher_create_type grpc_authorization_policy_provider_file_watcher_create_import;
|
188
198
|
grpc_authorization_policy_provider_release_type grpc_authorization_policy_provider_release_import;
|
189
199
|
grpc_tls_credentials_options_set_tls_session_key_log_file_path_type grpc_tls_credentials_options_set_tls_session_key_log_file_path_import;
|
190
|
-
grpc_raw_byte_buffer_create_type grpc_raw_byte_buffer_create_import;
|
191
|
-
grpc_raw_compressed_byte_buffer_create_type grpc_raw_compressed_byte_buffer_create_import;
|
192
|
-
grpc_byte_buffer_copy_type grpc_byte_buffer_copy_import;
|
193
|
-
grpc_byte_buffer_length_type grpc_byte_buffer_length_import;
|
194
|
-
grpc_byte_buffer_destroy_type grpc_byte_buffer_destroy_import;
|
195
|
-
grpc_byte_buffer_reader_init_type grpc_byte_buffer_reader_init_import;
|
196
|
-
grpc_byte_buffer_reader_destroy_type grpc_byte_buffer_reader_destroy_import;
|
197
|
-
grpc_byte_buffer_reader_next_type grpc_byte_buffer_reader_next_import;
|
198
|
-
grpc_byte_buffer_reader_peek_type grpc_byte_buffer_reader_peek_import;
|
199
|
-
grpc_byte_buffer_reader_readall_type grpc_byte_buffer_reader_readall_import;
|
200
|
-
grpc_raw_byte_buffer_from_reader_type grpc_raw_byte_buffer_from_reader_import;
|
201
|
-
gpr_log_severity_string_type gpr_log_severity_string_import;
|
202
|
-
gpr_log_type gpr_log_import;
|
203
|
-
gpr_should_log_type gpr_should_log_import;
|
204
|
-
gpr_log_message_type gpr_log_message_import;
|
205
|
-
gpr_set_log_verbosity_type gpr_set_log_verbosity_import;
|
206
|
-
gpr_log_verbosity_init_type gpr_log_verbosity_init_import;
|
207
|
-
gpr_set_log_function_type gpr_set_log_function_import;
|
208
200
|
grpc_slice_ref_type grpc_slice_ref_import;
|
209
201
|
grpc_slice_unref_type grpc_slice_unref_import;
|
210
202
|
grpc_slice_copy_type grpc_slice_copy_import;
|
@@ -257,6 +249,14 @@ gpr_malloc_aligned_type gpr_malloc_aligned_import;
|
|
257
249
|
gpr_free_aligned_type gpr_free_aligned_import;
|
258
250
|
gpr_cpu_num_cores_type gpr_cpu_num_cores_import;
|
259
251
|
gpr_cpu_current_cpu_type gpr_cpu_current_cpu_import;
|
252
|
+
gpr_log_severity_string_type gpr_log_severity_string_import;
|
253
|
+
gpr_log_type gpr_log_import;
|
254
|
+
gpr_should_log_type gpr_should_log_import;
|
255
|
+
gpr_log_message_type gpr_log_message_import;
|
256
|
+
gpr_set_log_verbosity_type gpr_set_log_verbosity_import;
|
257
|
+
gpr_log_verbosity_init_type gpr_log_verbosity_init_import;
|
258
|
+
gpr_set_log_function_type gpr_set_log_function_import;
|
259
|
+
gpr_assertion_failed_type gpr_assertion_failed_import;
|
260
260
|
gpr_format_message_type gpr_format_message_import;
|
261
261
|
gpr_strdup_type gpr_strdup_import;
|
262
262
|
gpr_asprintf_type gpr_asprintf_import;
|
@@ -308,6 +308,17 @@ gpr_sleep_until_type gpr_sleep_until_import;
|
|
308
308
|
gpr_timespec_to_micros_type gpr_timespec_to_micros_import;
|
309
309
|
|
310
310
|
void grpc_rb_load_imports(HMODULE library) {
|
311
|
+
grpc_raw_byte_buffer_create_import = (grpc_raw_byte_buffer_create_type) GetProcAddress(library, "grpc_raw_byte_buffer_create");
|
312
|
+
grpc_raw_compressed_byte_buffer_create_import = (grpc_raw_compressed_byte_buffer_create_type) GetProcAddress(library, "grpc_raw_compressed_byte_buffer_create");
|
313
|
+
grpc_byte_buffer_copy_import = (grpc_byte_buffer_copy_type) GetProcAddress(library, "grpc_byte_buffer_copy");
|
314
|
+
grpc_byte_buffer_length_import = (grpc_byte_buffer_length_type) GetProcAddress(library, "grpc_byte_buffer_length");
|
315
|
+
grpc_byte_buffer_destroy_import = (grpc_byte_buffer_destroy_type) GetProcAddress(library, "grpc_byte_buffer_destroy");
|
316
|
+
grpc_byte_buffer_reader_init_import = (grpc_byte_buffer_reader_init_type) GetProcAddress(library, "grpc_byte_buffer_reader_init");
|
317
|
+
grpc_byte_buffer_reader_destroy_import = (grpc_byte_buffer_reader_destroy_type) GetProcAddress(library, "grpc_byte_buffer_reader_destroy");
|
318
|
+
grpc_byte_buffer_reader_next_import = (grpc_byte_buffer_reader_next_type) GetProcAddress(library, "grpc_byte_buffer_reader_next");
|
319
|
+
grpc_byte_buffer_reader_peek_import = (grpc_byte_buffer_reader_peek_type) GetProcAddress(library, "grpc_byte_buffer_reader_peek");
|
320
|
+
grpc_byte_buffer_reader_readall_import = (grpc_byte_buffer_reader_readall_type) GetProcAddress(library, "grpc_byte_buffer_reader_readall");
|
321
|
+
grpc_raw_byte_buffer_from_reader_import = (grpc_raw_byte_buffer_from_reader_type) GetProcAddress(library, "grpc_raw_byte_buffer_from_reader");
|
311
322
|
grpc_compression_algorithm_is_message_import = (grpc_compression_algorithm_is_message_type) GetProcAddress(library, "grpc_compression_algorithm_is_message");
|
312
323
|
grpc_compression_algorithm_is_stream_import = (grpc_compression_algorithm_is_stream_type) GetProcAddress(library, "grpc_compression_algorithm_is_stream");
|
313
324
|
grpc_compression_algorithm_parse_import = (grpc_compression_algorithm_parse_type) GetProcAddress(library, "grpc_compression_algorithm_parse");
|
@@ -321,7 +332,6 @@ void grpc_rb_load_imports(HMODULE library) {
|
|
321
332
|
grpc_metadata_array_destroy_import = (grpc_metadata_array_destroy_type) GetProcAddress(library, "grpc_metadata_array_destroy");
|
322
333
|
grpc_call_details_init_import = (grpc_call_details_init_type) GetProcAddress(library, "grpc_call_details_init");
|
323
334
|
grpc_call_details_destroy_import = (grpc_call_details_destroy_type) GetProcAddress(library, "grpc_call_details_destroy");
|
324
|
-
grpc_register_plugin_import = (grpc_register_plugin_type) GetProcAddress(library, "grpc_register_plugin");
|
325
335
|
grpc_init_import = (grpc_init_type) GetProcAddress(library, "grpc_init");
|
326
336
|
grpc_shutdown_import = (grpc_shutdown_type) GetProcAddress(library, "grpc_shutdown");
|
327
337
|
grpc_is_initialized_import = (grpc_is_initialized_type) GetProcAddress(library, "grpc_is_initialized");
|
@@ -473,24 +483,6 @@ void grpc_rb_load_imports(HMODULE library) {
|
|
473
483
|
grpc_authorization_policy_provider_file_watcher_create_import = (grpc_authorization_policy_provider_file_watcher_create_type) GetProcAddress(library, "grpc_authorization_policy_provider_file_watcher_create");
|
474
484
|
grpc_authorization_policy_provider_release_import = (grpc_authorization_policy_provider_release_type) GetProcAddress(library, "grpc_authorization_policy_provider_release");
|
475
485
|
grpc_tls_credentials_options_set_tls_session_key_log_file_path_import = (grpc_tls_credentials_options_set_tls_session_key_log_file_path_type) GetProcAddress(library, "grpc_tls_credentials_options_set_tls_session_key_log_file_path");
|
476
|
-
grpc_raw_byte_buffer_create_import = (grpc_raw_byte_buffer_create_type) GetProcAddress(library, "grpc_raw_byte_buffer_create");
|
477
|
-
grpc_raw_compressed_byte_buffer_create_import = (grpc_raw_compressed_byte_buffer_create_type) GetProcAddress(library, "grpc_raw_compressed_byte_buffer_create");
|
478
|
-
grpc_byte_buffer_copy_import = (grpc_byte_buffer_copy_type) GetProcAddress(library, "grpc_byte_buffer_copy");
|
479
|
-
grpc_byte_buffer_length_import = (grpc_byte_buffer_length_type) GetProcAddress(library, "grpc_byte_buffer_length");
|
480
|
-
grpc_byte_buffer_destroy_import = (grpc_byte_buffer_destroy_type) GetProcAddress(library, "grpc_byte_buffer_destroy");
|
481
|
-
grpc_byte_buffer_reader_init_import = (grpc_byte_buffer_reader_init_type) GetProcAddress(library, "grpc_byte_buffer_reader_init");
|
482
|
-
grpc_byte_buffer_reader_destroy_import = (grpc_byte_buffer_reader_destroy_type) GetProcAddress(library, "grpc_byte_buffer_reader_destroy");
|
483
|
-
grpc_byte_buffer_reader_next_import = (grpc_byte_buffer_reader_next_type) GetProcAddress(library, "grpc_byte_buffer_reader_next");
|
484
|
-
grpc_byte_buffer_reader_peek_import = (grpc_byte_buffer_reader_peek_type) GetProcAddress(library, "grpc_byte_buffer_reader_peek");
|
485
|
-
grpc_byte_buffer_reader_readall_import = (grpc_byte_buffer_reader_readall_type) GetProcAddress(library, "grpc_byte_buffer_reader_readall");
|
486
|
-
grpc_raw_byte_buffer_from_reader_import = (grpc_raw_byte_buffer_from_reader_type) GetProcAddress(library, "grpc_raw_byte_buffer_from_reader");
|
487
|
-
gpr_log_severity_string_import = (gpr_log_severity_string_type) GetProcAddress(library, "gpr_log_severity_string");
|
488
|
-
gpr_log_import = (gpr_log_type) GetProcAddress(library, "gpr_log");
|
489
|
-
gpr_should_log_import = (gpr_should_log_type) GetProcAddress(library, "gpr_should_log");
|
490
|
-
gpr_log_message_import = (gpr_log_message_type) GetProcAddress(library, "gpr_log_message");
|
491
|
-
gpr_set_log_verbosity_import = (gpr_set_log_verbosity_type) GetProcAddress(library, "gpr_set_log_verbosity");
|
492
|
-
gpr_log_verbosity_init_import = (gpr_log_verbosity_init_type) GetProcAddress(library, "gpr_log_verbosity_init");
|
493
|
-
gpr_set_log_function_import = (gpr_set_log_function_type) GetProcAddress(library, "gpr_set_log_function");
|
494
486
|
grpc_slice_ref_import = (grpc_slice_ref_type) GetProcAddress(library, "grpc_slice_ref");
|
495
487
|
grpc_slice_unref_import = (grpc_slice_unref_type) GetProcAddress(library, "grpc_slice_unref");
|
496
488
|
grpc_slice_copy_import = (grpc_slice_copy_type) GetProcAddress(library, "grpc_slice_copy");
|
@@ -543,6 +535,14 @@ void grpc_rb_load_imports(HMODULE library) {
|
|
543
535
|
gpr_free_aligned_import = (gpr_free_aligned_type) GetProcAddress(library, "gpr_free_aligned");
|
544
536
|
gpr_cpu_num_cores_import = (gpr_cpu_num_cores_type) GetProcAddress(library, "gpr_cpu_num_cores");
|
545
537
|
gpr_cpu_current_cpu_import = (gpr_cpu_current_cpu_type) GetProcAddress(library, "gpr_cpu_current_cpu");
|
538
|
+
gpr_log_severity_string_import = (gpr_log_severity_string_type) GetProcAddress(library, "gpr_log_severity_string");
|
539
|
+
gpr_log_import = (gpr_log_type) GetProcAddress(library, "gpr_log");
|
540
|
+
gpr_should_log_import = (gpr_should_log_type) GetProcAddress(library, "gpr_should_log");
|
541
|
+
gpr_log_message_import = (gpr_log_message_type) GetProcAddress(library, "gpr_log_message");
|
542
|
+
gpr_set_log_verbosity_import = (gpr_set_log_verbosity_type) GetProcAddress(library, "gpr_set_log_verbosity");
|
543
|
+
gpr_log_verbosity_init_import = (gpr_log_verbosity_init_type) GetProcAddress(library, "gpr_log_verbosity_init");
|
544
|
+
gpr_set_log_function_import = (gpr_set_log_function_type) GetProcAddress(library, "gpr_set_log_function");
|
545
|
+
gpr_assertion_failed_import = (gpr_assertion_failed_type) GetProcAddress(library, "gpr_assertion_failed");
|
546
546
|
gpr_format_message_import = (gpr_format_message_type) GetProcAddress(library, "gpr_format_message");
|
547
547
|
gpr_strdup_import = (gpr_strdup_type) GetProcAddress(library, "gpr_strdup");
|
548
548
|
gpr_asprintf_import = (gpr_asprintf_type) GetProcAddress(library, "gpr_asprintf");
|
@@ -25,22 +25,55 @@
|
|
25
25
|
|
26
26
|
#include <windows.h>
|
27
27
|
|
28
|
+
#include <grpc/byte_buffer.h>
|
28
29
|
#include <grpc/compression.h>
|
29
30
|
#include <grpc/grpc.h>
|
30
31
|
#include <grpc/grpc_posix.h>
|
31
32
|
#include <grpc/grpc_security.h>
|
32
|
-
#include <grpc/impl/codegen/byte_buffer.h>
|
33
|
-
#include <grpc/impl/codegen/log.h>
|
34
33
|
#include <grpc/slice.h>
|
35
34
|
#include <grpc/slice_buffer.h>
|
36
35
|
#include <grpc/support/alloc.h>
|
37
36
|
#include <grpc/support/cpu.h>
|
37
|
+
#include <grpc/support/log.h>
|
38
38
|
#include <grpc/support/log_windows.h>
|
39
39
|
#include <grpc/support/string_util.h>
|
40
40
|
#include <grpc/support/sync.h>
|
41
41
|
#include <grpc/support/thd_id.h>
|
42
42
|
#include <grpc/support/time.h>
|
43
43
|
|
44
|
+
typedef grpc_byte_buffer*(*grpc_raw_byte_buffer_create_type)(grpc_slice* slices, size_t nslices);
|
45
|
+
extern grpc_raw_byte_buffer_create_type grpc_raw_byte_buffer_create_import;
|
46
|
+
#define grpc_raw_byte_buffer_create grpc_raw_byte_buffer_create_import
|
47
|
+
typedef grpc_byte_buffer*(*grpc_raw_compressed_byte_buffer_create_type)(grpc_slice* slices, size_t nslices, grpc_compression_algorithm compression);
|
48
|
+
extern grpc_raw_compressed_byte_buffer_create_type grpc_raw_compressed_byte_buffer_create_import;
|
49
|
+
#define grpc_raw_compressed_byte_buffer_create grpc_raw_compressed_byte_buffer_create_import
|
50
|
+
typedef grpc_byte_buffer*(*grpc_byte_buffer_copy_type)(grpc_byte_buffer* bb);
|
51
|
+
extern grpc_byte_buffer_copy_type grpc_byte_buffer_copy_import;
|
52
|
+
#define grpc_byte_buffer_copy grpc_byte_buffer_copy_import
|
53
|
+
typedef size_t(*grpc_byte_buffer_length_type)(grpc_byte_buffer* bb);
|
54
|
+
extern grpc_byte_buffer_length_type grpc_byte_buffer_length_import;
|
55
|
+
#define grpc_byte_buffer_length grpc_byte_buffer_length_import
|
56
|
+
typedef void(*grpc_byte_buffer_destroy_type)(grpc_byte_buffer* bb);
|
57
|
+
extern grpc_byte_buffer_destroy_type grpc_byte_buffer_destroy_import;
|
58
|
+
#define grpc_byte_buffer_destroy grpc_byte_buffer_destroy_import
|
59
|
+
typedef int(*grpc_byte_buffer_reader_init_type)(grpc_byte_buffer_reader* reader, grpc_byte_buffer* buffer);
|
60
|
+
extern grpc_byte_buffer_reader_init_type grpc_byte_buffer_reader_init_import;
|
61
|
+
#define grpc_byte_buffer_reader_init grpc_byte_buffer_reader_init_import
|
62
|
+
typedef void(*grpc_byte_buffer_reader_destroy_type)(grpc_byte_buffer_reader* reader);
|
63
|
+
extern grpc_byte_buffer_reader_destroy_type grpc_byte_buffer_reader_destroy_import;
|
64
|
+
#define grpc_byte_buffer_reader_destroy grpc_byte_buffer_reader_destroy_import
|
65
|
+
typedef int(*grpc_byte_buffer_reader_next_type)(grpc_byte_buffer_reader* reader, grpc_slice* slice);
|
66
|
+
extern grpc_byte_buffer_reader_next_type grpc_byte_buffer_reader_next_import;
|
67
|
+
#define grpc_byte_buffer_reader_next grpc_byte_buffer_reader_next_import
|
68
|
+
typedef int(*grpc_byte_buffer_reader_peek_type)(grpc_byte_buffer_reader* reader, grpc_slice** slice);
|
69
|
+
extern grpc_byte_buffer_reader_peek_type grpc_byte_buffer_reader_peek_import;
|
70
|
+
#define grpc_byte_buffer_reader_peek grpc_byte_buffer_reader_peek_import
|
71
|
+
typedef grpc_slice(*grpc_byte_buffer_reader_readall_type)(grpc_byte_buffer_reader* reader);
|
72
|
+
extern grpc_byte_buffer_reader_readall_type grpc_byte_buffer_reader_readall_import;
|
73
|
+
#define grpc_byte_buffer_reader_readall grpc_byte_buffer_reader_readall_import
|
74
|
+
typedef grpc_byte_buffer*(*grpc_raw_byte_buffer_from_reader_type)(grpc_byte_buffer_reader* reader);
|
75
|
+
extern grpc_raw_byte_buffer_from_reader_type grpc_raw_byte_buffer_from_reader_import;
|
76
|
+
#define grpc_raw_byte_buffer_from_reader grpc_raw_byte_buffer_from_reader_import
|
44
77
|
typedef int(*grpc_compression_algorithm_is_message_type)(grpc_compression_algorithm algorithm);
|
45
78
|
extern grpc_compression_algorithm_is_message_type grpc_compression_algorithm_is_message_import;
|
46
79
|
#define grpc_compression_algorithm_is_message grpc_compression_algorithm_is_message_import
|
@@ -80,9 +113,6 @@ extern grpc_call_details_init_type grpc_call_details_init_import;
|
|
80
113
|
typedef void(*grpc_call_details_destroy_type)(grpc_call_details* details);
|
81
114
|
extern grpc_call_details_destroy_type grpc_call_details_destroy_import;
|
82
115
|
#define grpc_call_details_destroy grpc_call_details_destroy_import
|
83
|
-
typedef void(*grpc_register_plugin_type)(void (*init)(void), void (*destroy)(void));
|
84
|
-
extern grpc_register_plugin_type grpc_register_plugin_import;
|
85
|
-
#define grpc_register_plugin grpc_register_plugin_import
|
86
116
|
typedef void(*grpc_init_type)(void);
|
87
117
|
extern grpc_init_type grpc_init_import;
|
88
118
|
#define grpc_init grpc_init_import
|
@@ -536,60 +566,6 @@ extern grpc_authorization_policy_provider_release_type grpc_authorization_policy
|
|
536
566
|
typedef void(*grpc_tls_credentials_options_set_tls_session_key_log_file_path_type)(grpc_tls_credentials_options* options, const char* path);
|
537
567
|
extern grpc_tls_credentials_options_set_tls_session_key_log_file_path_type grpc_tls_credentials_options_set_tls_session_key_log_file_path_import;
|
538
568
|
#define grpc_tls_credentials_options_set_tls_session_key_log_file_path grpc_tls_credentials_options_set_tls_session_key_log_file_path_import
|
539
|
-
typedef grpc_byte_buffer*(*grpc_raw_byte_buffer_create_type)(grpc_slice* slices, size_t nslices);
|
540
|
-
extern grpc_raw_byte_buffer_create_type grpc_raw_byte_buffer_create_import;
|
541
|
-
#define grpc_raw_byte_buffer_create grpc_raw_byte_buffer_create_import
|
542
|
-
typedef grpc_byte_buffer*(*grpc_raw_compressed_byte_buffer_create_type)(grpc_slice* slices, size_t nslices, grpc_compression_algorithm compression);
|
543
|
-
extern grpc_raw_compressed_byte_buffer_create_type grpc_raw_compressed_byte_buffer_create_import;
|
544
|
-
#define grpc_raw_compressed_byte_buffer_create grpc_raw_compressed_byte_buffer_create_import
|
545
|
-
typedef grpc_byte_buffer*(*grpc_byte_buffer_copy_type)(grpc_byte_buffer* bb);
|
546
|
-
extern grpc_byte_buffer_copy_type grpc_byte_buffer_copy_import;
|
547
|
-
#define grpc_byte_buffer_copy grpc_byte_buffer_copy_import
|
548
|
-
typedef size_t(*grpc_byte_buffer_length_type)(grpc_byte_buffer* bb);
|
549
|
-
extern grpc_byte_buffer_length_type grpc_byte_buffer_length_import;
|
550
|
-
#define grpc_byte_buffer_length grpc_byte_buffer_length_import
|
551
|
-
typedef void(*grpc_byte_buffer_destroy_type)(grpc_byte_buffer* bb);
|
552
|
-
extern grpc_byte_buffer_destroy_type grpc_byte_buffer_destroy_import;
|
553
|
-
#define grpc_byte_buffer_destroy grpc_byte_buffer_destroy_import
|
554
|
-
typedef int(*grpc_byte_buffer_reader_init_type)(grpc_byte_buffer_reader* reader, grpc_byte_buffer* buffer);
|
555
|
-
extern grpc_byte_buffer_reader_init_type grpc_byte_buffer_reader_init_import;
|
556
|
-
#define grpc_byte_buffer_reader_init grpc_byte_buffer_reader_init_import
|
557
|
-
typedef void(*grpc_byte_buffer_reader_destroy_type)(grpc_byte_buffer_reader* reader);
|
558
|
-
extern grpc_byte_buffer_reader_destroy_type grpc_byte_buffer_reader_destroy_import;
|
559
|
-
#define grpc_byte_buffer_reader_destroy grpc_byte_buffer_reader_destroy_import
|
560
|
-
typedef int(*grpc_byte_buffer_reader_next_type)(grpc_byte_buffer_reader* reader, grpc_slice* slice);
|
561
|
-
extern grpc_byte_buffer_reader_next_type grpc_byte_buffer_reader_next_import;
|
562
|
-
#define grpc_byte_buffer_reader_next grpc_byte_buffer_reader_next_import
|
563
|
-
typedef int(*grpc_byte_buffer_reader_peek_type)(grpc_byte_buffer_reader* reader, grpc_slice** slice);
|
564
|
-
extern grpc_byte_buffer_reader_peek_type grpc_byte_buffer_reader_peek_import;
|
565
|
-
#define grpc_byte_buffer_reader_peek grpc_byte_buffer_reader_peek_import
|
566
|
-
typedef grpc_slice(*grpc_byte_buffer_reader_readall_type)(grpc_byte_buffer_reader* reader);
|
567
|
-
extern grpc_byte_buffer_reader_readall_type grpc_byte_buffer_reader_readall_import;
|
568
|
-
#define grpc_byte_buffer_reader_readall grpc_byte_buffer_reader_readall_import
|
569
|
-
typedef grpc_byte_buffer*(*grpc_raw_byte_buffer_from_reader_type)(grpc_byte_buffer_reader* reader);
|
570
|
-
extern grpc_raw_byte_buffer_from_reader_type grpc_raw_byte_buffer_from_reader_import;
|
571
|
-
#define grpc_raw_byte_buffer_from_reader grpc_raw_byte_buffer_from_reader_import
|
572
|
-
typedef const char*(*gpr_log_severity_string_type)(gpr_log_severity severity);
|
573
|
-
extern gpr_log_severity_string_type gpr_log_severity_string_import;
|
574
|
-
#define gpr_log_severity_string gpr_log_severity_string_import
|
575
|
-
typedef void(*gpr_log_type)(const char* file, int line, gpr_log_severity severity, const char* format, ...) GPR_PRINT_FORMAT_CHECK(4, 5);
|
576
|
-
extern gpr_log_type gpr_log_import;
|
577
|
-
#define gpr_log gpr_log_import
|
578
|
-
typedef int(*gpr_should_log_type)(gpr_log_severity severity);
|
579
|
-
extern gpr_should_log_type gpr_should_log_import;
|
580
|
-
#define gpr_should_log gpr_should_log_import
|
581
|
-
typedef void(*gpr_log_message_type)(const char* file, int line, gpr_log_severity severity, const char* message);
|
582
|
-
extern gpr_log_message_type gpr_log_message_import;
|
583
|
-
#define gpr_log_message gpr_log_message_import
|
584
|
-
typedef void(*gpr_set_log_verbosity_type)(gpr_log_severity min_severity_to_print);
|
585
|
-
extern gpr_set_log_verbosity_type gpr_set_log_verbosity_import;
|
586
|
-
#define gpr_set_log_verbosity gpr_set_log_verbosity_import
|
587
|
-
typedef void(*gpr_log_verbosity_init_type)(void);
|
588
|
-
extern gpr_log_verbosity_init_type gpr_log_verbosity_init_import;
|
589
|
-
#define gpr_log_verbosity_init gpr_log_verbosity_init_import
|
590
|
-
typedef void(*gpr_set_log_function_type)(gpr_log_func func);
|
591
|
-
extern gpr_set_log_function_type gpr_set_log_function_import;
|
592
|
-
#define gpr_set_log_function gpr_set_log_function_import
|
593
569
|
typedef grpc_slice(*grpc_slice_ref_type)(grpc_slice s);
|
594
570
|
extern grpc_slice_ref_type grpc_slice_ref_import;
|
595
571
|
#define grpc_slice_ref grpc_slice_ref_import
|
@@ -746,6 +722,30 @@ extern gpr_cpu_num_cores_type gpr_cpu_num_cores_import;
|
|
746
722
|
typedef unsigned(*gpr_cpu_current_cpu_type)(void);
|
747
723
|
extern gpr_cpu_current_cpu_type gpr_cpu_current_cpu_import;
|
748
724
|
#define gpr_cpu_current_cpu gpr_cpu_current_cpu_import
|
725
|
+
typedef const char*(*gpr_log_severity_string_type)(gpr_log_severity severity);
|
726
|
+
extern gpr_log_severity_string_type gpr_log_severity_string_import;
|
727
|
+
#define gpr_log_severity_string gpr_log_severity_string_import
|
728
|
+
typedef void(*gpr_log_type)(const char* file, int line, gpr_log_severity severity, const char* format, ...) GPR_PRINT_FORMAT_CHECK(4, 5);
|
729
|
+
extern gpr_log_type gpr_log_import;
|
730
|
+
#define gpr_log gpr_log_import
|
731
|
+
typedef int(*gpr_should_log_type)(gpr_log_severity severity);
|
732
|
+
extern gpr_should_log_type gpr_should_log_import;
|
733
|
+
#define gpr_should_log gpr_should_log_import
|
734
|
+
typedef void(*gpr_log_message_type)(const char* file, int line, gpr_log_severity severity, const char* message);
|
735
|
+
extern gpr_log_message_type gpr_log_message_import;
|
736
|
+
#define gpr_log_message gpr_log_message_import
|
737
|
+
typedef void(*gpr_set_log_verbosity_type)(gpr_log_severity min_severity_to_print);
|
738
|
+
extern gpr_set_log_verbosity_type gpr_set_log_verbosity_import;
|
739
|
+
#define gpr_set_log_verbosity gpr_set_log_verbosity_import
|
740
|
+
typedef void(*gpr_log_verbosity_init_type)(void);
|
741
|
+
extern gpr_log_verbosity_init_type gpr_log_verbosity_init_import;
|
742
|
+
#define gpr_log_verbosity_init gpr_log_verbosity_init_import
|
743
|
+
typedef void(*gpr_set_log_function_type)(gpr_log_func func);
|
744
|
+
extern gpr_set_log_function_type gpr_set_log_function_import;
|
745
|
+
#define gpr_set_log_function gpr_set_log_function_import
|
746
|
+
typedef void(*gpr_assertion_failed_type)(const char* filename, int line, const char* message);
|
747
|
+
extern gpr_assertion_failed_type gpr_assertion_failed_import;
|
748
|
+
#define gpr_assertion_failed gpr_assertion_failed_import
|
749
749
|
typedef char*(*gpr_format_message_type)(int messageid);
|
750
750
|
extern gpr_format_message_type gpr_format_message_import;
|
751
751
|
#define gpr_format_message gpr_format_message_import
|
Binary file
|
Binary file
|
@@ -139,6 +139,7 @@ module GRPC
|
|
139
139
|
end
|
140
140
|
|
141
141
|
# set_output_stream_done is relevant on client-side
|
142
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
142
143
|
def write_loop(requests, is_client: true, set_output_stream_done: nil)
|
143
144
|
GRPC.logger.debug('bidi-write-loop: starting')
|
144
145
|
count = 0
|
@@ -182,6 +183,7 @@ module GRPC
|
|
182
183
|
ensure
|
183
184
|
set_output_stream_done.call if is_client
|
184
185
|
end
|
186
|
+
# rubocop:enable Metrics/PerceivedComplexity
|
185
187
|
|
186
188
|
# Provides an enumerator that yields results of remote reads
|
187
189
|
def read_loop(set_input_stream_done, is_client: true)
|
@@ -28,28 +28,6 @@ describe GRPC::Core::Channel do
|
|
28
28
|
GRPC::Core::ChannelCredentials.new(load_test_certs[0])
|
29
29
|
end
|
30
30
|
|
31
|
-
def fork_with_propagated_error_message
|
32
|
-
pipe_read, pipe_write = IO.pipe
|
33
|
-
pid = fork do
|
34
|
-
pipe_read.close
|
35
|
-
begin
|
36
|
-
yield
|
37
|
-
rescue => exc
|
38
|
-
pipe_write.syswrite(exc.message)
|
39
|
-
end
|
40
|
-
pipe_write.close
|
41
|
-
end
|
42
|
-
pipe_write.close
|
43
|
-
|
44
|
-
exc_message = pipe_read.read
|
45
|
-
Process.wait(pid)
|
46
|
-
|
47
|
-
unless $CHILD_STATUS.success?
|
48
|
-
raise "forked process failed with #{$CHILD_STATUS}"
|
49
|
-
end
|
50
|
-
raise exc_message unless exc_message.empty?
|
51
|
-
end
|
52
|
-
|
53
31
|
shared_examples '#new' do
|
54
32
|
it 'take a host name without channel args' do
|
55
33
|
blk = proc do
|
@@ -102,14 +80,6 @@ describe GRPC::Core::Channel do
|
|
102
80
|
blk = construct_with_args(args)
|
103
81
|
expect(&blk).to_not raise_error
|
104
82
|
end
|
105
|
-
|
106
|
-
it 'raises if grpc was initialized in another process' do
|
107
|
-
blk = construct_with_args({})
|
108
|
-
expect(&blk).not_to raise_error
|
109
|
-
expect do
|
110
|
-
fork_with_propagated_error_message(&blk)
|
111
|
-
end.to raise_error(RuntimeError, 'grpc cannot be used before and after forking')
|
112
|
-
end
|
113
83
|
end
|
114
84
|
|
115
85
|
describe '#new for secure channels' do
|
@@ -168,19 +138,6 @@ describe GRPC::Core::Channel do
|
|
168
138
|
expect(&blk).to raise_error(RuntimeError)
|
169
139
|
STDERR.puts "#{Time.now}: finished: raises an error if called on a closed channel"
|
170
140
|
end
|
171
|
-
|
172
|
-
it 'raises if grpc was initialized in another process' do
|
173
|
-
ch = GRPC::Core::Channel.new(fake_host, nil, :this_channel_is_insecure)
|
174
|
-
|
175
|
-
deadline = Time.now + 5
|
176
|
-
|
177
|
-
blk = proc do
|
178
|
-
fork_with_propagated_error_message do
|
179
|
-
ch.create_call(nil, nil, 'phony_method', nil, deadline)
|
180
|
-
end
|
181
|
-
end
|
182
|
-
expect(&blk).to raise_error(RuntimeError, 'grpc cannot be used before and after forking')
|
183
|
-
end
|
184
141
|
end
|
185
142
|
|
186
143
|
describe '#destroy' do
|
@@ -85,12 +85,15 @@ shared_examples 'basic GRPC message delivery is OK' do
|
|
85
85
|
# confirm the server can read the inbound message
|
86
86
|
server_thread.join
|
87
87
|
server_ops = {
|
88
|
-
CallOps::RECV_MESSAGE => nil
|
88
|
+
CallOps::RECV_MESSAGE => nil
|
89
|
+
}
|
90
|
+
server_batch = server_call.run_batch(server_ops)
|
91
|
+
expect(server_batch.message).to eq(sent_message)
|
92
|
+
server_ops = {
|
89
93
|
CallOps::RECV_CLOSE_ON_SERVER => nil,
|
90
94
|
CallOps::SEND_STATUS_FROM_SERVER => ok_status
|
91
95
|
}
|
92
96
|
server_batch = server_call.run_batch(server_ops)
|
93
|
-
expect(server_batch.message).to eq(sent_message)
|
94
97
|
expect(server_batch.send_close).to be true
|
95
98
|
expect(server_batch.send_status).to be true
|
96
99
|
|
@@ -123,13 +126,16 @@ shared_examples 'basic GRPC message delivery is OK' do
|
|
123
126
|
# confirm the server can read the inbound message
|
124
127
|
server_thread.join
|
125
128
|
server_ops = {
|
126
|
-
CallOps::RECV_MESSAGE => nil
|
129
|
+
CallOps::RECV_MESSAGE => nil
|
130
|
+
}
|
131
|
+
server_batch = server_call.run_batch(server_ops)
|
132
|
+
expect(server_batch.message).to eq(sent_message)
|
133
|
+
server_ops = {
|
127
134
|
CallOps::RECV_CLOSE_ON_SERVER => nil,
|
128
135
|
CallOps::SEND_MESSAGE => reply_text,
|
129
136
|
CallOps::SEND_STATUS_FROM_SERVER => ok_status
|
130
137
|
}
|
131
138
|
server_batch = server_call.run_batch(server_ops)
|
132
|
-
expect(server_batch.message).to eq(sent_message)
|
133
139
|
expect(server_batch.send_close).to be true
|
134
140
|
expect(server_batch.send_message).to be true
|
135
141
|
expect(server_batch.send_status).to be true
|
@@ -168,13 +174,16 @@ shared_examples 'basic GRPC message delivery is OK' do
|
|
168
174
|
# confirm the server can read the inbound message
|
169
175
|
server_thread.join
|
170
176
|
server_ops = {
|
171
|
-
CallOps::RECV_MESSAGE => nil
|
177
|
+
CallOps::RECV_MESSAGE => nil
|
178
|
+
}
|
179
|
+
server_batch = server_call.run_batch(server_ops)
|
180
|
+
expect(server_batch.message).to eq(long_request_str)
|
181
|
+
server_ops = {
|
172
182
|
CallOps::RECV_CLOSE_ON_SERVER => nil,
|
173
183
|
CallOps::SEND_MESSAGE => long_response_str,
|
174
184
|
CallOps::SEND_STATUS_FROM_SERVER => ok_status
|
175
185
|
}
|
176
186
|
server_batch = server_call.run_batch(server_ops)
|
177
|
-
expect(server_batch.message).to eq(long_request_str)
|
178
187
|
expect(server_batch.send_close).to be true
|
179
188
|
expect(server_batch.send_message).to be true
|
180
189
|
expect(server_batch.send_status).to be true
|
@@ -245,12 +254,15 @@ shared_examples 'basic GRPC message delivery is OK' do
|
|
245
254
|
the_status = Struct::Status.new(StatusCodes::OK, 'OK', {})
|
246
255
|
server_thread.join
|
247
256
|
server_ops = {
|
248
|
-
CallOps::RECV_MESSAGE => nil
|
257
|
+
CallOps::RECV_MESSAGE => nil
|
258
|
+
}
|
259
|
+
server_batch = server_call.run_batch(server_ops)
|
260
|
+
expect(server_batch.message).to eq sent_message
|
261
|
+
server_ops = {
|
249
262
|
CallOps::SEND_MESSAGE => reply_text,
|
250
263
|
CallOps::SEND_STATUS_FROM_SERVER => the_status
|
251
264
|
}
|
252
265
|
server_batch = server_call.run_batch(server_ops)
|
253
|
-
expect(server_batch.message).to eq sent_message
|
254
266
|
expect(server_batch.send_status).to be true
|
255
267
|
expect(server_batch.send_message).to be true
|
256
268
|
|
@@ -65,12 +65,21 @@ describe GRPC::ActiveCall do
|
|
65
65
|
|
66
66
|
describe 'restricted view methods' do
|
67
67
|
before(:each) do
|
68
|
-
call = make_test_call
|
69
|
-
ActiveCall.client_invoke(call)
|
70
|
-
@client_call = ActiveCall.new(call, @pass_through,
|
68
|
+
@call = make_test_call
|
69
|
+
ActiveCall.client_invoke(@call)
|
70
|
+
@client_call = ActiveCall.new(@call, @pass_through,
|
71
71
|
@pass_through, deadline)
|
72
72
|
end
|
73
73
|
|
74
|
+
after(:each) do
|
75
|
+
# terminate the RPC that was started in before(:each)
|
76
|
+
recvd_rpc = @received_rpcs_queue.pop
|
77
|
+
recvd_call = recvd_rpc.call
|
78
|
+
recvd_call.run_batch(CallOps::SEND_INITIAL_METADATA => nil)
|
79
|
+
@call.run_batch(CallOps::RECV_INITIAL_METADATA => nil)
|
80
|
+
send_and_receive_close_and_status(@call, recvd_call)
|
81
|
+
end
|
82
|
+
|
74
83
|
describe '#multi_req_view' do
|
75
84
|
it 'exposes a fixed subset of the ActiveCall.methods' do
|
76
85
|
want = %w(cancelled?, deadline, each_remote_read, metadata, \
|
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.52.0.pre2
|
5
5
|
platform: x64-mingw-ucrt
|
6
6
|
authors:
|
7
7
|
- gRPC Authors
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: src/ruby/bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.
|
89
|
+
version: '0.22'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0.
|
96
|
+
version: '0.22'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rake
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -112,30 +112,30 @@ dependencies:
|
|
112
112
|
name: rake-compiler
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - "
|
115
|
+
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 1.
|
117
|
+
version: 1.2.1
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - "
|
122
|
+
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 1.
|
124
|
+
version: 1.2.1
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: rake-compiler-dock
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: '1.
|
131
|
+
version: '1.3'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: '1.
|
138
|
+
version: '1.3'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: rspec
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -156,14 +156,14 @@ dependencies:
|
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
159
|
+
version: 1.41.0
|
160
160
|
type: :development
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
166
|
+
version: 1.41.0
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: signet
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -214,8 +214,10 @@ files:
|
|
214
214
|
- src/ruby/bin/math_services_pb.rb
|
215
215
|
- src/ruby/bin/noproto_client.rb
|
216
216
|
- src/ruby/bin/noproto_server.rb
|
217
|
-
- src/ruby/ext/grpc/ext-export-truffleruby.clang
|
218
|
-
- src/ruby/ext/grpc/ext-export-truffleruby.gcc
|
217
|
+
- src/ruby/ext/grpc/ext-export-truffleruby-with-ruby-abi-version.clang
|
218
|
+
- src/ruby/ext/grpc/ext-export-truffleruby-with-ruby-abi-version.gcc
|
219
|
+
- src/ruby/ext/grpc/ext-export-with-ruby-abi-version.clang
|
220
|
+
- src/ruby/ext/grpc/ext-export-with-ruby-abi-version.gcc
|
219
221
|
- src/ruby/ext/grpc/ext-export.clang
|
220
222
|
- src/ruby/ext/grpc/ext-export.gcc
|
221
223
|
- src/ruby/ext/grpc/extconf.rb
|
@@ -254,6 +256,7 @@ files:
|
|
254
256
|
- src/ruby/ext/grpc/rb_xds_server_credentials.h
|
255
257
|
- src/ruby/lib/grpc.rb
|
256
258
|
- src/ruby/lib/grpc/3.1/grpc_c.so
|
259
|
+
- src/ruby/lib/grpc/3.2/grpc_c.so
|
257
260
|
- src/ruby/lib/grpc/core/status_codes.rb
|
258
261
|
- src/ruby/lib/grpc/core/time_consts.rb
|
259
262
|
- src/ruby/lib/grpc/errors.rb
|
@@ -333,7 +336,7 @@ homepage: https://github.com/google/grpc/tree/master/src/ruby
|
|
333
336
|
licenses:
|
334
337
|
- Apache-2.0
|
335
338
|
metadata: {}
|
336
|
-
post_install_message:
|
339
|
+
post_install_message:
|
337
340
|
rdoc_options: []
|
338
341
|
require_paths:
|
339
342
|
- src/ruby/lib
|
@@ -343,18 +346,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
343
346
|
requirements:
|
344
347
|
- - ">="
|
345
348
|
- !ruby/object:Gem::Version
|
346
|
-
version: '
|
349
|
+
version: '3.1'
|
347
350
|
- - "<"
|
348
351
|
- !ruby/object:Gem::Version
|
349
|
-
version: 3.
|
352
|
+
version: 3.3.dev
|
350
353
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
351
354
|
requirements:
|
352
355
|
- - ">"
|
353
356
|
- !ruby/object:Gem::Version
|
354
357
|
version: 1.3.1
|
355
358
|
requirements: []
|
356
|
-
rubygems_version: 3.
|
357
|
-
signing_key:
|
359
|
+
rubygems_version: 3.4.5
|
360
|
+
signing_key:
|
358
361
|
specification_version: 4
|
359
362
|
summary: GRPC system in Ruby
|
360
363
|
test_files:
|