Skip to content

Commit

Permalink
FIx testReplicaIgnoresOlderRetentionLeasesVersion (#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 #37951
Closes #38245
  • Loading branch information
dnhatn committed Feb 2, 2019
1 parent db24e5c commit 0169965
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 0169965

Please sign in to comment.