Skip to content

Commit

Permalink
Disable JSON extensions tests for JRuby native.
Browse files Browse the repository at this point in the history
  • Loading branch information
haberman committed Jan 4, 2024
1 parent 96f0870 commit 91e2dc5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ruby/tests/basic_proto2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,15 @@ def test_extension
end

def test_extension_json
omit "Java Protobuf JsonFormat does not handle Proto2 extensions" if defined? JRUBY_VERSION and :NATIVE == Google::Protobuf::IMPLEMENTATION
message = TestExtensions.decode_json '{"[basic_test_proto2.optional_int32_extension]": 123}'
extension = Google::Protobuf::DescriptorPool.generated_pool.lookup 'basic_test_proto2.optional_int32_extension'
assert_instance_of Google::Protobuf::FieldDescriptor, extension
assert_equal 123, extension.get(message)
end

def test_extension_json_separate_pool
omit "Java Protobuf JsonFormat does not handle Proto2 extensions" if defined? JRUBY_VERSION and :NATIVE == Google::Protobuf::IMPLEMENTATION
pool = Google::Protobuf::DescriptorPool.new

# This serialized descriptor is a subset of basic_test_proto2.proto:
Expand Down

0 comments on commit 91e2dc5

Please sign in to comment.