-
Notifications
You must be signed in to change notification settings - Fork 595
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
Improve reliability of tests #643
Conversation
Update some tests to use more deterministic methods of testing in memory spans. This helps the core repo pass tests after adding Windows to CI matrix.
a783c60
to
dde62ce
Compare
self.assertEqual(2, len(spans)) | ||
span1, span2 = spans | ||
self.assertEqual(span1.name, "Elasticsearch/test-index") |
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.
Why delete this check?
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.
This is not asserted by the span.by_name()
call. It returns a span if found, otherwise throws an assertion error. Perhaps I should rename it to by_name_or_fail()
or something?
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.
LMK if that makes sense. I can follow up with another PR.
@@ -122,7 +122,8 @@ envlist = | |||
py3{6,7,8,9}-test-instrumentation-grpc | |||
|
|||
; opentelemetry-instrumentation-sqlalchemy | |||
py3{6,7,8,9}-test-instrumentation-sqlalchemy{11,14} | |||
py3{6,7}-test-instrumentation-sqlalchemy{11} |
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.
Can you add a comment explaining why we do this?
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.
https://github.com/open-telemetry/opentelemetry-python-contrib/pull/531/files#r696214503
Will add a comment to the file.
Description
Update some tests to use more deterministic methods of testing in memory
spans. This helps the core repo pass tests after adding Windows to CI
matrix.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
This PR has been split out of #531 in order to not block the core Windows PR. We can merge core Windows PR along with this one and continue to work on contrib Windows.
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.