refactor(instrumentation): replace Mockito with MockK in ActivityTrac…#1262
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1262 +/- ##
=======================================
Coverage 64.30% 64.30%
=======================================
Files 142 142
Lines 3012 3012
Branches 296 296
=======================================
Hits 1937 1937
Misses 998 998
Partials 77 77 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
breedx-splk
left a comment
There was a problem hiding this comment.
Thanks for the help! Much appreciated.
| Mockito.verifyNoMoreInteractions(tracerCreator) | ||
|
|
||
| assertThat(result).isSameAs(activityTracer) | ||
| verify { activityTracer.initiateRestartSpanIfNecessary(false) } |
There was a problem hiding this comment.
nit: we're missing the verification that no other interactions were done, but it's probably fine.
There was a problem hiding this comment.
@breedx-splk I was actually aware of it, should have mentioned in PR description, there is not a straightforward replacement of verifynointeraction in mockK, let me know if you want me to research about it more to find a potential one.
There was a problem hiding this comment.
@amishhaa you could use verify(exactly = 1) {} which will have a similar effect to verifyNoMoreInteractions
There was a problem hiding this comment.
@fractalwrench yes definitely! sorry for the delay, ill do it by EOD.
d0fa88d to
7176178
Compare
|
Done adding the changes cc: @fractalwrench, @breedx-splk |
|
Thanks again for the contribution! |
Part of #1247.