Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Commit

Permalink
Pend spec broken on JRuby
Browse files Browse the repository at this point in the history
  • Loading branch information
JonRowe committed Sep 8, 2024
1 parent 29ab2de commit 4170844
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion spec/rspec/support_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,20 @@ def object.some_method
end

if defined?(Fiber) && RUBY_VERSION.to_f >= 2.0
it "shares data across fibres" do
broken_on_jruby =
if RSpec::Support::Ruby.jruby?
"As Fiber.new creates a new thread on JRuby this is currently " \
"broken. There are alternative implementations that do work but " \
"they cause issues for mocks, so given this is a minor edge case " \
"and thread data is already broken, its acceptable. Pending " \
"because future JRuby may fix this. see: "\
"https://github.com/jruby/jruby/issues/1806 and " \
"https://github.com/rspec/rspec-support/pull/610"
else
false
end

it "shares data across fibers", :pending => broken_on_jruby do
RSpec::Support.thread_local_data[:__for_test] = :oh_hai

Fiber.new do
Expand Down

0 comments on commit 4170844

Please sign in to comment.