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 authored Feb 2, 2019
1 parent 475a045 commit 1ec04df
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,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 1ec04df

Please sign in to comment.