Skip to content

Commit 0c97338

Browse files
KAFKA-18796-2: Corrected the check for acquisition lock timeout in Sh… (#19338)
Minor PR to correct the check for the presence of acquisition lock in `assertionFailedMessage` method in `SharePartitionTest` Reviewers: Andrew Schofield <[email protected]>
1 parent 7ee73e6 commit 0c97338

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/test/java/kafka/server/share/SharePartitionTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -6660,12 +6660,12 @@ private String assertionFailedMessage(SharePartition sharePartition, Map<Long, L
66606660
for (Long offset : entry.getValue()) {
66616661
errorMessage.append(String.format("\toffset: %d, offset state: %s, offset acquisition lock timeout task present: %b\n",
66626662
offset, sharePartition.cachedState().get(entry.getKey()).offsetState().get(offset).state().id(),
6663-
sharePartition.cachedState().get(entry.getKey()).offsetState().get(offset).acquisitionLockTimeoutTask() == null));
6663+
sharePartition.cachedState().get(entry.getKey()).offsetState().get(offset).acquisitionLockTimeoutTask() != null));
66646664
}
66656665
} else {
66666666
errorMessage.append(String.format("batch start offset: %d, batch state: %s, batch acquisition lock timeout task present: %b\n",
66676667
entry.getKey(), sharePartition.cachedState().get(entry.getKey()).batchState().id(),
6668-
sharePartition.cachedState().get(entry.getKey()).batchAcquisitionLockTimeoutTask() == null));
6668+
sharePartition.cachedState().get(entry.getKey()).batchAcquisitionLockTimeoutTask() != null));
66696669
}
66706670
}
66716671
return errorMessage.toString();

0 commit comments

Comments
 (0)