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

Fix diagnostic debug settings test #1198

Merged
merged 1 commit into from
Oct 2, 2020
Merged

Conversation

marcotc
Copy link
Member

@marcotc marcotc commented Oct 2, 2020

We were previously trying to match on expect_any_instance_of(Kernel), which is a very blunt matcher that doesn't work reliably: it failed to intercept mocked method calls depending on test execution order.

This PR changes that matcher to expect_any_instance_of(Object), which seems to behave nicely regardless of our execution patterns.

Overall, expect_any_instance_of has many corner cases we've stumbled upon recently, and it has proven flaky (RSpec team doesn't recommend it either), but I don't see a better way to this require statements like in this test.

@marcotc marcotc added the dev/testing Involves testing processes (e.g. RSpec) label Oct 2, 2020
@marcotc marcotc requested a review from a team October 2, 2020 19:46
@marcotc marcotc self-assigned this Oct 2, 2020
@marcotc marcotc merged commit 7cf2eef into master Oct 2, 2020
@marcotc marcotc deleted the fix/diagnostics-debug-test branch October 2, 2020 20:04
@ericmustin ericmustin added this to the 0.42.0 milestone Oct 21, 2020
michaelkl pushed a commit to michaelkl/dd-trace-rb that referenced this pull request Oct 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev/testing Involves testing processes (e.g. RSpec)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants