-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Fix mutation function in JoinStatusTests #92534
Fix mutation function in JoinStatusTests #92534
Conversation
Sometimes `mutateJoinStatus()` would fail to return a different object, e.g. if the message was very short. Also in case 4 it was mutating both the message and the age, but should not have been mutating the message.
Pinging @elastic/es-distributed (Team:Distributed) |
server/src/test/java/org/elasticsearch/cluster/coordination/JoinStatusTests.java
Show resolved
Hide resolved
randomAlphaOfLength(30), | ||
randomNonNegativeTimeValue() | ||
originalJoinStatus.message(), | ||
ESTestCase.randomValueOtherThan(originalJoinStatus.age(), this::randomNonNegativeTimeValue) |
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.
Is the ESTestCase
necessary here?
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.
No, not sure why IntelliJ put that there 😕
Sometimes `mutateJoinStatus()` would fail to return a different object, e.g. if the message was very short. Also in case 4 it was mutating both the message and the age, but should not have been mutating the message.
💔 Backport failed
You can use sqren/backport to manually backport by running |
Sometimes
mutateJoinStatus()
would fail to return a different object, e.g. if the message was very short. Also in case 4 it was mutating both the message and the age, but should not have been mutating the message.