Convert tests to from :sdk:metrics-testing to :sdk:testing - #4444
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4444 +/- ##
============================================
+ Coverage 89.95% 90.01% +0.06%
- Complexity 4957 4970 +13
============================================
Files 569 570 +1
Lines 15358 15384 +26
Branches 1470 1472 +2
============================================
+ Hits 13815 13848 +33
+ Misses 1073 1067 -6
+ Partials 470 469 -1
Continue to review full report at Codecov.
|
|
My only comment here is that some of the tests used Specifically, some of the "satisfiesExactly" are in place to prevent certain bad behaviors, while the "anySatisfy" are because testing exact behavior is hard. |
|
We can add assertions that seem useful indeed. I wouldn't expect to need |
anuraaga
left a comment
There was a problem hiding this comment.
Thanks @jack-berg completely missed doing this
Wanted to increase confidence that
:sdk:testinghas all the tools needed for making metrics assertions after realizing that internally we're still using:sdk:metrics-testingeverywhere. So I switched all our internal usage to:sdk:testing.For the most part, the tools in
:sdk:testingsuffice. In rare cases like asserting the size of point data it was possible but more awkward. In cases where we test directly test low level features like exemplar we don't have the accessors to make assertions directly (everything flows throughassertThat(MetricData)).I found that
HistogramPointAssertwas missing methods to assert exemplars, so I added those.I deleted everything in
:sdk:metrics-testingthat was no longer being used. What's left are some utilities for asserting exemplars directly, and for asserting exponential histograms.