Skip to content

Unreliable net-http tests #9614

Description

@jcharaoui

The HTTP tests in test/mri/net/http/test_http.rb seem to be unreliable, at least in 10.1.1.0.

On Debian unstable every time I run these tests at least on random test case fails with an EBADF: Bad file descriptor error.

Example:

root@05ef37c32f9d:/jruby# ./bin/jruby test/mri/runner.rb --excludes=test/mri/excludes:test/mri/excludes_wip test/mri/net/http/test_http.rb
Run options: 
  --seed=49126
  --excludes=test/mri/excludes:test/mri/excludes_wip

# Running tests:

[59/84] TestNetHTTP_v1_2#test_send_requestwarning: thread "Ruby-0-Thread-45: /jruby/test/mri/net/http/utils.rb:27" terminated with exception (report_on_exception is true):Errno::EBADF: Bad file descriptor - No message available
  close at org/jruby/RubyIO.java:2352
  start at /jruby/test/mri/net/http/utils.rb:33
   loop at org/jruby/RubyKernel.java:1861
  start at /jruby/test/mri/net/http/utils.rb:28
 = 0.02 s
  1) Error:
TestNetHTTP_v1_2#test_send_request:
Errno::EBADF: Bad file descriptor - No message available
    org/jruby/RubyIO.java:2352:in 'close'
    /jruby/test/mri/net/http/utils.rb:33:in 'block in start'
    org/jruby/RubyKernel.java:1861:in 'loop'
    /jruby/test/mri/net/http/utils.rb:28:in 'block in start'

Finished tests in 9.457121s, 8.6707 tests/s, 65.5591 assertions/s.                                           
82 tests, 620 assertions, 0 failures, 1 errors, 0 skips

ruby -v: jruby 10.1.1.0 (4.0.0) 2026-08-28 ffffffffff OpenJDK 64-Bit Server VM 25.0.4.1+1-1-Debian on 25.0.4.1+1-1-Debian +indy +jit [x86_64-linux]

I'm able to reproduce these errors on a git build of the latest HEAD.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions