ruby-ldap / ruby-net-ldap

Pure Ruby LDAP library
https://rubygems.org/gems/net-ldap
Other
399 stars 253 forks source link

TestSSLBER test failures #409

Open voxik opened 2 years ago

voxik commented 2 years ago

Running the test suite on Fedora Rawhide against Ruby 3.1, I observe the following failures:

E
===============================================================================
Error: test_transmit_ber_encoded_numbers(TestSSLBER): OpenSSL::SSL::SSLError: SSL session is not started yet
/usr/share/ruby/openssl/buffering.rb:354:in `syswrite'
/usr/share/ruby/openssl/buffering.rb:354:in `do_write'
/usr/share/ruby/openssl/buffering.rb:371:in `block in write'
/usr/share/ruby/openssl/buffering.rb:370:in `each'
/usr/share/ruby/openssl/buffering.rb:370:in `inject'
/usr/share/ruby/openssl/buffering.rb:370:in `write'
/builddir/build/BUILD/net-ldap-0.17.1/usr/share/gems/gems/net-ldap-0.17.1/test/test_ssl_ber.rb:41:in `test_transmit_ber_encoded_numbers'
     38:   def test_transmit_ber_encoded_numbers
     39:     omit_if RUBY_PLATFORM == "java", "JRuby throws an error without a real socket"
     40: 
  => 41:     @to.write 1234.to_ber
     42:     assert_equal 1234, @from.read_ber
     43:   end
     44: end
===============================================================================
E
===============================================================================
Error: test_transmit_strings(TestSSLBER): OpenSSL::SSL::SSLError: SSL session is not started yet
/usr/share/ruby/openssl/buffering.rb:354:in `syswrite'
/usr/share/ruby/openssl/buffering.rb:354:in `do_write'
/usr/share/ruby/openssl/buffering.rb:371:in `block in write'
/usr/share/ruby/openssl/buffering.rb:370:in `each'
/usr/share/ruby/openssl/buffering.rb:370:in `inject'
/usr/share/ruby/openssl/buffering.rb:370:in `write'
/builddir/build/BUILD/net-ldap-0.17.1/usr/share/gems/gems/net-ldap-0.17.1/test/test_ssl_ber.rb:9:in `block in transmit'
/usr/share/ruby/timeout.rb:107:in `block in timeout'
/usr/share/ruby/timeout.rb:36:in `block in catch'
/usr/share/ruby/timeout.rb:36:in `catch'
/usr/share/ruby/timeout.rb:36:in `catch'
/usr/share/ruby/timeout.rb:123:in `timeout'
/builddir/build/BUILD/net-ldap-0.17.1/usr/share/gems/gems/net-ldap-0.17.1/test/test_ssl_ber.rb:8:in `transmit'
/builddir/build/BUILD/net-ldap-0.17.1/usr/share/gems/gems/net-ldap-0.17.1/test/test_ssl_ber.rb:35:in `test_transmit_strings'
     32:   def test_transmit_strings
     33:     omit_if RUBY_PLATFORM == "java", "JRuby throws an error without a real socket"
     34: 
  => 35:     assert_equal "foo", transmit("foo")
     36:   end
     37: 
     38:   def test_transmit_ber_encoded_numbers
===============================================================================

Can this be Ruby 3.1 issue, the to OpenSSL changes? Not sure.

thesamesam commented 1 year ago

This seems fixed for me with 0.18.0.