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
Fix for compatibility issue with Async 2.6.2 #2083
Changes from all commits
004a41b
198a0d5
f597c1f
ed6be7e
75c7c86
7e453db
ec8a03b
3a6f817
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,4 +73,16 @@ def test_parents_thread_fiber | |
def test_parents_fiber_thread | ||
run_nested_parent_test(Fiber, Thread) | ||
end | ||
|
||
def test_thread_instrumentation_args_preserved | ||
Thread.new('arg 1', 2) do |arg1, arg2| | ||
assert_equal ['arg 1', 2], [arg1, arg2] | ||
end.join | ||
end | ||
|
||
def test_fiber_instrumentation_args_preserved | ||
Fiber.new do |arg1, arg2| | ||
assert_equal ['arg 1', 2], [arg1, arg2] | ||
end.resume('arg 1', 2) | ||
end | ||
Comment on lines
+77
to
+87
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the agent running during these test cases? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, the other tests in the files are making sure the agent is recording stuff and nesting spans correctly, so the agent is running and the instrumentation is installed. I didn't add a transaction to these tests since I didn't need to assert anything about a transaction and only cared about making sure the instrumentation was passing the args properly. |
||
end |
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.
Ooo good to know. Were they not running before?
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.
apparently not! I know they ran at some point in the past, because they did when i was working on them, but I think i ended up switching to passing nil to gemfile as an afterthought before merging in that PR iirc, because we thought that would work fine, so that would have have broken it.