-
-
Notifications
You must be signed in to change notification settings - Fork 446
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
Feat: Add breadcrumbs for the Apollo integration #1726
Conversation
@Test | ||
fun `adds breadcrumb when http calls succeeds`() { | ||
executeQuery() | ||
verify(fixture.hub).addBreadcrumb(com.nhaarman.mockitokotlin2.check<Breadcrumb> { |
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.
verify(fixture.hub).addBreadcrumb(com.nhaarman.mockitokotlin2.check<Breadcrumb> { | |
verify(fixture.hub).addBreadcrumb(check<Breadcrumb> { |
we can just import the check extension method
@@ -30,8 +33,9 @@ class SentryApolloInterceptorTest { | |||
|
|||
class Fixture { | |||
val server = MockWebServer() | |||
val hub = spy(HubAdapter.getInstance()) |
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, why spy
instead of mock
?
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.
Initially it was meant to be full integration test, using coroutines Sentry context. But, since on Android Sentry context does not need to be used, I've changed this test to use mocked hub instead of verifying transport.
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.
left 2 comments but rather than that LGTM
📜 Description
Feat: Add breadcrumbs for the Apollo integration
💡 Motivation and Context
Fixes #1721
💚 How did you test it?
Unit tests.
📝 Checklist