-
Notifications
You must be signed in to change notification settings - Fork 743
add test code to agentops's tracer #324
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
Conversation
…ide the agentops' _trace_context_sync function.
tests/tracer/test_agentops.py
Outdated
| ) | ||
|
|
||
| def otlp_traces_endpoint(self) -> str: | ||
| return "dump://" |
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.
Are you sure this won't cause errors? How do you check whether the traces have been dumped?
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.
Got it, added a mocked service.
tests/tracer/test_agentops.py
Outdated
| from agentlightning.utils import otlp | ||
|
|
||
|
|
||
| class MockLightningStoreService: |
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.
suggest MockOTLPService
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.
done.
tests/tracer/test_agentops.py
Outdated
| tracer.teardown() | ||
|
|
||
|
|
||
| def test_agentops_trace_with_store_or_not(): |
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.
use pytest.parametrize to split into three tests maybe.
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.
done.
|
/ci |
|
🚀 CI Watcher for correlation id-3585196667-mihb45ca triggered by comment 3585196667
✅ All runs completed. |
add test code to expand the test code coverage to cover all paths inside the agentops' _trace_context_sync function.