Skip to content

Commit

Permalink
Merge pull request #739 from johnnyshields/better-fix-for-jruby
Browse files Browse the repository at this point in the history
[READY] v2.x Fix JRuby, 2nd attempt
  • Loading branch information
pitbulk authored Jan 19, 2025
2 parents 9ab4d3f + 38bcc32 commit 30ae236
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&.reject! { |e| 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

Expand Down

0 comments on commit 30ae236

Please sign in to comment.