Skip to content

Commit

Permalink
Correct fix for JRuby Zlib error
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyshields committed Jan 19, 2025
1 parent 9ab4d3f commit 263f13f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -500,13 +500,12 @@ def encrypt_xml(assertion_xml, private_key)
# 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&.any? {|e| e.error&.is_a?(Zlib::BufError) }
failures.reject! {|e| e.error&.is_a?(Zlib::BufError) }
failures << Minitest::Skip.new('Skipping Zlib::BufError in JRuby. See: https://github.com/jruby/jruby/issues/6613')
end
end
end

Expand Down

0 comments on commit 263f13f

Please sign in to comment.