Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip concurrent threaded test on jruby #2415

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 22 additions & 20 deletions sentry-ruby/spec/sentry/breadcrumb/sentry_logger_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,33 +69,35 @@
end

# see https://github.com/getsentry/sentry-ruby/issues/1858
it "noops on thread with cloned hub" do
mutex = Mutex.new
cv = ConditionVariable.new

a = Thread.new do
expect(Sentry.get_current_hub).to be_a(Sentry::Hub)
unless RUBY_PLATFORM == "java"
it "noops on thread with cloned hub" do
mutex = Mutex.new
cv = ConditionVariable.new

a = Thread.new do
expect(Sentry.get_current_hub).to be_a(Sentry::Hub)

# close in another thread
b = Thread.new do
mutex.synchronize do
Sentry.close
cv.signal
end
end

# close in another thread
b = Thread.new do
mutex.synchronize do
Sentry.close
cv.signal
end
end
# wait for other thread to close SDK
cv.wait(mutex)

mutex.synchronize do
# wait for other thread to close SDK
cv.wait(mutex)
expect(Sentry).not_to receive(:add_breadcrumb)
logger.info("foo")
end

expect(Sentry).not_to receive(:add_breadcrumb)
logger.info("foo")
b.join
end

b.join
a.join
end

a.join
end
end
end
Loading