Skip to content

Commit bb46faa

Browse files
committed
Fix variable name
1 parent d6bd1b8 commit bb46faa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ public void testOperationPermitsOnPrimaryShards() throws Exception {
669669
isPrimaryMode = true;
670670
}
671671
assert indexShard.getReplicationTracker().isPrimaryMode() == isPrimaryMode;
672-
final long primaryTerm = indexShard.getPendingPrimaryTerm();
672+
final long pendingPrimaryTerm = indexShard.getPendingPrimaryTerm();
673673
if (isPrimaryMode) {
674674
Releasable operation1 = acquirePrimaryOperationPermitBlockingly(indexShard);
675675
assertEquals(1, indexShard.getActiveOperationsCount());
@@ -715,7 +715,7 @@ public void onFailure(final Exception e) {
715715
}
716716

717717
if (Assertions.ENABLED && indexShard.routingEntry().isRelocationTarget() == false) {
718-
assertThat(expectThrows(AssertionError.class, () -> indexShard.acquireReplicaOperationPermit(primaryTerm,
718+
assertThat(expectThrows(AssertionError.class, () -> indexShard.acquireReplicaOperationPermit(pendingPrimaryTerm,
719719
indexShard.getGlobalCheckpoint(), indexShard.getMaxSeqNoOfUpdatesOrDeletes(), new ActionListener<Releasable>() {
720720
@Override
721721
public void onResponse(Releasable releasable) {

0 commit comments

Comments
 (0)