diff --git a/server/src/test/java/org/elasticsearch/cluster/coordination/JoinStatusTests.java b/server/src/test/java/org/elasticsearch/cluster/coordination/JoinStatusTests.java index cf67ecc02b16d..36161da21b898 100644 --- a/server/src/test/java/org/elasticsearch/cluster/coordination/JoinStatusTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/coordination/JoinStatusTests.java @@ -47,7 +47,7 @@ private JoinStatus mutateJoinStatus(JoinStatus originalJoinStatus) { return new JoinStatus( originalJoinStatus.remoteNode(), originalJoinStatus.term(), - randomAlphaOfLengthBetween(0, 30), + randomValueOtherThan(originalJoinStatus.message(), () -> randomAlphaOfLengthBetween(0, 30)), originalJoinStatus.age() ); } @@ -55,8 +55,8 @@ private JoinStatus mutateJoinStatus(JoinStatus originalJoinStatus) { return new JoinStatus( originalJoinStatus.remoteNode(), originalJoinStatus.term(), - randomAlphaOfLength(30), - randomNonNegativeTimeValue() + originalJoinStatus.message(), + randomValueOtherThan(originalJoinStatus.age(), this::randomNonNegativeTimeValue) ); } case 4 -> {