Skip to content
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

Conversation

DaveCTurner
Copy link
Contributor

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.

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.
@DaveCTurner DaveCTurner added >test Issues or PRs that are addressing/adding tests :Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. v8.6.1 v8.7.0 v7.17.9 labels Dec 22, 2022
@elasticsearchmachine elasticsearchmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label Dec 22, 2022
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

randomAlphaOfLength(30),
randomNonNegativeTimeValue()
originalJoinStatus.message(),
ESTestCase.randomValueOtherThan(originalJoinStatus.age(), this::randomNonNegativeTimeValue)
Copy link
Member

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?

Copy link
Contributor Author

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 😕

@DaveCTurner DaveCTurner added auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) auto-backport-and-merge labels Dec 23, 2022
@elasticsearchmachine elasticsearchmachine merged commit 46158bb into elastic:main Dec 23, 2022
@DaveCTurner DaveCTurner deleted the 2022-12-22-JoinStatusTests-did-not-mutate branch December 23, 2022 11:37
DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request Dec 23, 2022
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.
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.6
7.17 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 92534

elasticsearchmachine pushed a commit that referenced this pull request Dec 23, 2022
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) :Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. >test Issues or PRs that are addressing/adding tests v8.6.1 v8.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants