Skip to content

Commit d51158d

Browse files
committed
Run service options extension test against CRuby native implementation
It seems that JRuby doesn't support this so far. And, service options are frozen objects. But, in CRuby FFI, can't get a Message instance if the message is frozen. So this doesn't work. https://github.com/protocolbuffers/protobuf/blob/d406cae0138f4f1f283a22be9474bef1f48bb0dc/ruby/lib/google/protobuf/ffi/message.rb#L419 So the service options extension test only passes in CRuby native.
1 parent 8e6e60a commit d51158d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

ruby/tests/service_test.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def test_service_options
3333
end
3434

3535
def test_service_options_extensions
36+
omit "JRuby and FFI do not support service options extensions" if defined?(JRUBY_VERSION) || Google::Protobuf::IMPLEMENTATION != :NATIVE
3637
extension_field = Google::Protobuf::DescriptorPool.generated_pool.lookup('service_test_protos.test_options')
3738
assert_equal 8325, extension_field.get(@test_service.options).int_option_value
3839
end

0 commit comments

Comments
 (0)