-
-
Notifications
You must be signed in to change notification settings - Fork 942
Open
Description
There's some issue with the with_http method used by the Ruby 4.0 OpenURI tests resulting in a number of failures in test:mri:stdlib that all look the same. It's unclear if this is a problem with this test code or something broken in OpenURI itself.
The code:
jruby/test/mri/open-uri/utils.rb
Lines 318 to 341 in f3a4525
| def with_http(log_tester=lambda {|log| assert_equal([], log) }) | |
| log = [] | |
| host = "127.0.0.1" | |
| srv = SimpleHTTPServer.new(host, 0, log) | |
| server_thread = srv.start | |
| server_thread2 = Thread.new { | |
| server_thread.join | |
| if log_tester | |
| log_tester.call(log) | |
| end | |
| } | |
| port = srv.instance_variable_get(:@server).addr[1] | |
| client_thread = Thread.new { | |
| begin | |
| yield srv, "http://#{host}:#{port}", server_thread, log | |
| ensure | |
| srv.shutdown | |
| end | |
| } | |
| assert_join_threads([client_thread, server_thread2]) | |
| end |
Example error:
TestOpenURI#test_redirect_auth_success [/home/runner/work/jruby/jruby/test/mri/open-uri/utils.rb:340]:
exceptions on 1 threads:
#<Thread:0x534df4b /home/runner/work/jruby/jruby/test/mri/open-uri/utils.rb:324 dead>:
org/jruby/ext/socket/RubyTCPServer.java:143:in 'accept': stream closed in another thread (IOError)
from /home/runner/work/jruby/jruby/test/mri/open-uri/utils.rb:22:in 'block in start'
from org/jruby/RubyKernel.java:1687:in 'loop'
from /home/runner/work/jruby/jruby/test/mri/open-uri/utils.rb:21:in 'block in start'
The tests will be excluded for now.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels