Skip to content

Commit

Permalink
Merge pull request #740 from johnnyshields/backport-jruby-fix
Browse files Browse the repository at this point in the history
Backport JRuby test fix to master
  • Loading branch information
pitbulk authored Jan 20, 2025
2 parents 66893b5 + 011ff4f commit bbe39e9
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -385,15 +385,14 @@ def downcased_escape(str)
# Remove after https://github.com/jruby/jruby/issues/6613 is fixed
if Minitest::Test.jruby?
module JRubyZlibTestExtension
@@jruby_zlib_failures = 0

def run
def capture_exceptions
super
rescue Zlib::BufError => e
raise e unless (@@jruby_zlib_failures += 1) < 10
skip "Skipping Zlib::BufError in JRuby, see https://github.com/jruby/jruby/issues/6613"

if failures && failures.reject! { |e| e.error && e.error.is_a?(Zlib::BufError) } # nil if nothing rejected
failures << Minitest::Skip.new('Skipping Zlib::BufError in JRuby. See: https://github.com/jruby/jruby/issues/6613')
end
end
end

Minitest::Test.prepend(JRubyZlibTestExtension)
end
end

0 comments on commit bbe39e9

Please sign in to comment.