-
Notifications
You must be signed in to change notification settings - Fork 375
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
test:Migrate span tests to RSpec #1149
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 👍
@@ -187,7 +187,6 @@ | |||
|
|||
context 'is a block' do | |||
it 'yields to the error block and raises the error' do | |||
expect_any_instance_of(Datadog::Span).to_not receive(:set_error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out a specific combination of any_instance_of
and JRuby causes issues like this: https://app.circleci.com/pipelines/github/DataDog/dd-trace-rb/1694/workflows/b0a5b0af-711b-4aca-81db-3c99b1d504e5/jobs/81614
I've opened a rspec-mocks
issue with this report: rspec/rspec-mocks#1338
I wasn't able to confidently fix it, unfortunately 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appreciate if you could respond in your ticket. Unfortunately, most probably nobody is going to fix it for you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @pirj, I'll follow up on the ticket, but long story short: I dedicated around 2 days trying to fix it in rspec-mocks
but I wasn't able to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot. I understand, if it's tolerable on your side, it might not worth the effort. However, if you decide to proceed, I'll be happy to provide any support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gotcha...weird bug, otherwise lgtm
Migrate tests from
test/span_test.rb
tospec/ddtrace/span_spec.rb
. Also added a few extra assertions that were missing, specially for#parent=
and#set_error
.