Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The fileno mapping is managed globally for a given JRuby runtime and during testing there may be other threads still cleaning up and removing filenos from the mapping. We give this test ten tries to have the starting count and ending count match. This should help avoid intermittent failures like the following: ``` Failure: test_rubyio_fileno_mapping_leak(TestIO) /home/runner/work/jruby/jruby/test/jruby/test_io.rb:527:in `test_rubyio_fileno_mapping_leak' 524: io = org.jruby.RubyIO.new(JRuby.runtime, java.io.ByteArrayOutputStream.new) 525: 526: open_io_count = fileno_util.number_of_wrappers => 527: assert_equal(starting_count + 1, open_io_count) 528: 529: io.close 530: closed_io_count = fileno_util.number_of_wrappers ```
- Loading branch information