-
Notifications
You must be signed in to change notification settings - Fork 914
Adds all fields in RequestOverrideConfiguration in toBuilder #2862
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
Conversation
.addMetricPublisher(mock(MetricPublisher.class)) | ||
.build(); | ||
|
||
assertThat(configuration.toBuilder().build()).isEqualTo(configuration); |
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.
Could we use something like usingRecursiveComparison()
here?
https://assertj.github.io/doc/#assertj-core-recursive-comparison
Or does the combination of EqualsVerifier
and isEqualTo
provide similar guarantees?
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.
In this situation they yield similar results, but I do like the more verbose output of usingRecursiveComparison()
…ated from an instance
6fde02c
to
5841de1
Compare
.addMetricPublisher(mock(MetricPublisher.class)) | ||
.build(); | ||
|
||
assertThat(configuration.toBuilder().build()).usingRecursiveComparison().isEqualTo(configuration); |
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.
It would be nice if we could find a way to enforce this validation for all of our classes that implement toBuilder()
.
Kudos, SonarCloud Quality Gate passed! |
…4e66acdd3 Pull request: release <- staging/f218cb95-de05-40e5-a8fa-3d64e66acdd3
Motivation and Context
When a
requestOverrideConfiguration
is modified from an existing instance all values of existing fields should be copied. For instance,metricPublishers
was missing, leading to the paginated operations code path missing metric publishers added as a request override and no metrics are published.Description
Updated the
BuilderImpl
constructor that takes aRequestOverrideConfiguration
as an argument.Testing
Types of changes
Checklist
mvn install
succeedsLicense