adixitconfluent commented on code in PR #20246:
URL: https://github.com/apache/kafka/pull/20246#discussion_r2459670347


##########
core/src/test/java/kafka/server/share/SharePartitionTest.java:
##########
@@ -8801,6 +8838,543 @@ public void 
testRecordArchivedWithWriteStateRPCFailure() throws InterruptedExcep
         assertEquals(2, 
sharePartition.cachedState().get(7L).batchDeliveryCount());
     }
 
+    @Test
+    public void testAcquireSingleBatchInRecordLimitMode() {
+        Persister persister = Mockito.mock(Persister.class);
+        SharePartition sharePartition = 
Mockito.spy(SharePartitionBuilder.builder()
+            .withState(SharePartitionState.ACTIVE)
+            .withDefaultAcquisitionLockTimeoutMs(ACQUISITION_LOCK_TIMEOUT_MS)
+            .withPersister(persister)
+            .build());
+        
Mockito.doReturn(true).when(sharePartition).isRecordLimitMode(Mockito.any());

Review Comment:
   same comment as 
https://github.com/apache/kafka/pull/20246#discussion_r2450531664, we should 
get rid of this statement and send `ShareAcquireMode.RECORD_LIMIT `. Please 
make the change to other tests as well.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to