-
Notifications
You must be signed in to change notification settings - Fork 111
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
Disable package capture when testing #1165
Conversation
🦙 MegaLinter status: ❌ ERROR
See detailed report in MegaLinter reports |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1165 +/- ##
=======================================
Coverage ? 81.76%
=======================================
Files ? 195
Lines ? 21643
Branches ? 3779
=======================================
Hits ? 17696
Misses ? 2850
Partials ? 1097 ☔ View full report in Codecov by Sentry. |
a636f24
to
6f4892c
Compare
6f4892c
to
d070f58
Compare
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.
I see the flag being set in the tests that do not need the package capture, but I am not seeing where the flag's status does anything with the function itself (in the config.py to set the setting/flag or the package capture function itself)
tests/mlmodel_sklearn/restats
Outdated
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.
Out of curiosity, what is this file?
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.
whoops...it's a cprofile output..how did that get in there!? Removing...
The package capture setting is in the config file here: https://github.com/newrelic/newrelic-python-agent/blob/main/newrelic/config.py#L567. |
Oh, OK, that's what I was missing--I did not realize this was a flag we already had. Looks good to me! |
Overview
Package capturing is slow and we don't need to do it for every test. Disable package capturing unless we are explicitly testing it.
Previously, when it took too long to capture the package info, it caused application connect timeouts that raised an AssertionError of application.active.