FIx testReplicaIgnoresOlderRetentionLeasesVersion (#38246)
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
This commit is contained in:
parent
475a045192
commit
1ec04dff43
|
@ -340,8 +340,8 @@ public class ReplicationTrackerRetentionLeaseTests extends ReplicationTrackerTes
|
||||||
for (int j = 0; j < innerLength; j++) {
|
for (int j = 0; j < innerLength; j++) {
|
||||||
leases.add(
|
leases.add(
|
||||||
new RetentionLease(i + "-" + j, randomNonNegativeLong(), randomNonNegativeLong(), randomAlphaOfLength(8)));
|
new RetentionLease(i + "-" + j, randomNonNegativeLong(), randomNonNegativeLong(), randomAlphaOfLength(8)));
|
||||||
version++;
|
|
||||||
}
|
}
|
||||||
|
version++;
|
||||||
if (rarely()) {
|
if (rarely()) {
|
||||||
primaryTerm++;
|
primaryTerm++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue