Skip to content

Fix mutation function in JoinStatusTests#92534

Merged
elasticsearchmachine merged 3 commits intoelastic:mainfrom
DaveCTurner:2022-12-22-JoinStatusTests-did-not-mutate
Dec 23, 2022
Merged

Fix mutation function in JoinStatusTests#92534
elasticsearchmachine merged 3 commits intoelastic:mainfrom
DaveCTurner:2022-12-22-JoinStatusTests-did-not-mutate

Conversation

@DaveCTurner
Copy link
Copy Markdown
Member

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/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 Meta label for distributed team. label Dec 22, 2022
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

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

randomAlphaOfLength(30),
randomNonNegativeTimeValue()
originalJoinStatus.message(),
ESTestCase.randomValueOtherThan(originalJoinStatus.age(), this::randomNonNegativeTimeValue)
Copy link
Copy Markdown
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
Copy Markdown
Member 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
Copy Markdown
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/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. Team:Distributed Meta label for distributed team. >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