Skip to content

Commit bbe39e9

Browse files
authored
Merge pull request #740 from johnnyshields/backport-jruby-fix
Backport JRuby test fix to master
2 parents 66893b5 + 011ff4f commit bbe39e9

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

test/test_helper.rb

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -385,15 +385,14 @@ def downcased_escape(str)
385385
# Remove after https://github.com/jruby/jruby/issues/6613 is fixed
386386
if Minitest::Test.jruby?
387387
module JRubyZlibTestExtension
388-
@@jruby_zlib_failures = 0
389-
390-
def run
388+
def capture_exceptions
391389
super
392-
rescue Zlib::BufError => e
393-
raise e unless (@@jruby_zlib_failures += 1) < 10
394-
skip "Skipping Zlib::BufError in JRuby, see https://github.com/jruby/jruby/issues/6613"
390+
391+
if failures && failures.reject! { |e| e.error && e.error.is_a?(Zlib::BufError) } # nil if nothing rejected
392+
failures << Minitest::Skip.new('Skipping Zlib::BufError in JRuby. See: https://github.com/jruby/jruby/issues/6613')
393+
end
395394
end
396395
end
397396

398397
Minitest::Test.prepend(JRubyZlibTestExtension)
399-
end
398+
end

0 commit comments

Comments
 (0)