Convert tests to from :sdk:metrics-testing to :sdk:testing #4444
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Wanted to increase confidence that
:sdk:testing
has all the tools needed for making metrics assertions after realizing that internally we're still using:sdk:metrics-testing
everywhere. So I switched all our internal usage to:sdk:testing
.For the most part, the tools in
:sdk:testing
suffice. 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
HistogramPointAssert
was missing methods to assert exemplars, so I added those.I deleted everything in
:sdk:metrics-testing
that was no longer being used. What's left are some utilities for asserting exemplars directly, and for asserting exponential histograms.