Add ObservationContextAssert error assertions by simonbasle · Pull Request #3267 · micrometer-metrics/micrometer (original) (raw)
Navigation Menu
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Conversation
This change adds assertions allowing to validate the usage of
Observation#error(Throwable):
doesNotHaveError()hasError()(for any error)hasError(Throwable)(for a specific error)
This change adds assertions allowing to validate the usage of Observation#error(Throwable):
doesNotHaveError()hasError()(for any error)hasError(Throwable)(for a specific error)
possible further improvements to consider:
hasErrorWithMessage(String); hasErrorSatisfying(ThrowingConsumer); hasErrorMatching(Predicate);
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks
The existing testing logic already supports the advanced cases. I'm renaming the methods for consistency - #3269
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})