Skip to content

Commit 30ae236

Browse files
authored
Merge pull request #739 from johnnyshields/better-fix-for-jruby
[READY] v2.x Fix JRuby, 2nd attempt
2 parents 9ab4d3f + 38bcc32 commit 30ae236

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

test/test_helper.rb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -500,13 +500,12 @@ def encrypt_xml(assertion_xml, private_key)
500500
# Remove after https://github.com/jruby/jruby/issues/6613 is fixed
501501
if Minitest::Test.jruby?
502502
module JRubyZlibTestExtension
503-
@@jruby_zlib_failures = 0
504-
505-
def run
503+
def capture_exceptions
506504
super
507-
rescue Zlib::BufError => e
508-
raise e unless (@@jruby_zlib_failures += 1) < 10
509-
skip "Skipping Zlib::BufError in JRuby, see https://github.com/jruby/jruby/issues/6613"
505+
506+
if failures&.reject! { |e| e.error&.is_a?(Zlib::BufError) } # nil if nothing rejected
507+
failures << Minitest::Skip.new('Skipping Zlib::BufError in JRuby. See: https://github.com/jruby/jruby/issues/6613')
508+
end
510509
end
511510
end
512511

0 commit comments

Comments
 (0)