Skip to content

Commit 99ca101

Browse files
committed
Backport JRuby test fix to master
1 parent 66893b5 commit 99ca101

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
@@ -385,13 +385,12 @@ 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&.reject! { |e| 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

0 commit comments

Comments
 (0)