Skip to content

Commit

Permalink
FIx testReplicaIgnoresOlderRetentionLeasesVersion (elastic#38246)
Browse files Browse the repository at this point in the history
If the innerLength is 0, the version won't be increased; then there will
be two RetentionLeases with the same term and version, but their leases
are different.

Relates elastic#37951
Closes elastic#38245
  • Loading branch information
dnhatn committed Feb 2, 2019
1 parent cca86ea commit 6fb5733
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,8 @@ public void testReplicaIgnoresOlderRetentionLeasesVersion() {
for (int j = 0; j < innerLength; j++) {
leases.add(
new RetentionLease(i + "-" + j, randomNonNegativeLong(), randomNonNegativeLong(), randomAlphaOfLength(8)));
version++;
}
version++;
if (rarely()) {
primaryTerm++;
}
Expand Down

0 comments on commit 6fb5733

Please sign in to comment.