@@ -181,7 +181,7 @@ public void testTryCompleteWhenMinBytesNotSatisfiedOnFirstFetch() {
181
181
182
182
when (sp0 .canAcquireRecords ()).thenReturn (true );
183
183
when (sp1 .canAcquireRecords ()).thenReturn (false );
184
- when (sp0 .acquire (any (), anyInt (), anyInt (), anyLong (), any ())).thenReturn (
184
+ when (sp0 .acquire (any (), anyInt (), anyInt (), anyLong (), any (), any () )).thenReturn (
185
185
createShareAcquiredRecords (new ShareFetchResponseData .AcquiredRecords ().setFirstOffset (0 ).setLastOffset (3 ).setDeliveryCount ((short ) 1 )));
186
186
187
187
// We are testing the case when the share partition is getting fetched for the first time, so for the first time
@@ -253,7 +253,7 @@ public void testTryCompleteWhenMinBytesNotSatisfiedOnSubsequentFetch() {
253
253
254
254
when (sp0 .canAcquireRecords ()).thenReturn (true );
255
255
when (sp1 .canAcquireRecords ()).thenReturn (false );
256
- when (sp0 .acquire (any (), anyInt (), anyInt (), anyLong (), any ())).thenReturn (
256
+ when (sp0 .acquire (any (), anyInt (), anyInt (), anyLong (), any (), any () )).thenReturn (
257
257
createShareAcquiredRecords (new ShareFetchResponseData .AcquiredRecords ().setFirstOffset (0 ).setLastOffset (3 ).setDeliveryCount ((short ) 1 )));
258
258
259
259
// We are testing the case when the share partition has been fetched before, hence we are mocking positionDiff
@@ -305,7 +305,7 @@ public void testDelayedShareFetchTryCompleteReturnsTrue() {
305
305
306
306
when (sp0 .canAcquireRecords ()).thenReturn (true );
307
307
when (sp1 .canAcquireRecords ()).thenReturn (false );
308
- when (sp0 .acquire (anyString (), anyInt (), anyInt (), anyLong (), any (FetchPartitionData .class ))).thenReturn (
308
+ when (sp0 .acquire (anyString (), anyInt (), anyInt (), anyLong (), any (FetchPartitionData .class ), any () )).thenReturn (
309
309
createShareAcquiredRecords (new ShareFetchResponseData .AcquiredRecords ().setFirstOffset (0 ).setLastOffset (3 ).setDeliveryCount ((short ) 1 )));
310
310
doAnswer (invocation -> buildLogReadResult (List .of (tp0 ))).when (replicaManager ).readFromLog (any (), any (), any (ReplicaQuota .class ), anyBoolean ());
311
311
@@ -418,7 +418,7 @@ public void testReplicaManagerFetchShouldHappenOnComplete() {
418
418
419
419
when (sp0 .canAcquireRecords ()).thenReturn (true );
420
420
when (sp1 .canAcquireRecords ()).thenReturn (false );
421
- when (sp0 .acquire (anyString (), anyInt (), anyInt (), anyLong (), any (FetchPartitionData .class ))).thenReturn (
421
+ when (sp0 .acquire (anyString (), anyInt (), anyInt (), anyLong (), any (FetchPartitionData .class ), any () )).thenReturn (
422
422
createShareAcquiredRecords (new ShareFetchResponseData .AcquiredRecords ().setFirstOffset (0 ).setLastOffset (3 ).setDeliveryCount ((short ) 1 )));
423
423
doAnswer (invocation -> buildLogReadResult (List .of (tp0 ))).when (replicaManager ).readFromLog (any (), any (), any (ReplicaQuota .class ), anyBoolean ());
424
424
@@ -580,7 +580,7 @@ public void testForceCompleteTriggersDelayedActionsQueue() {
580
580
// sp1 can be acquired now
581
581
when (sp1 .maybeAcquireFetchLock ()).thenReturn (true );
582
582
when (sp1 .canAcquireRecords ()).thenReturn (true );
583
- when (sp1 .acquire (anyString (), anyInt (), anyInt (), anyLong (), any (FetchPartitionData .class ))).thenReturn (
583
+ when (sp1 .acquire (anyString (), anyInt (), anyInt (), anyLong (), any (FetchPartitionData .class ), any () )).thenReturn (
584
584
createShareAcquiredRecords (new ShareFetchResponseData .AcquiredRecords ().setFirstOffset (0 ).setLastOffset (3 ).setDeliveryCount ((short ) 1 )));
585
585
586
586
// when forceComplete is called for delayedShareFetch2, since tp1 is common in between delayed share fetch
@@ -676,7 +676,7 @@ public void testExceptionInMinBytesCalculation() {
676
676
BROKER_TOPIC_STATS );
677
677
678
678
when (sp0 .canAcquireRecords ()).thenReturn (true );
679
- when (sp0 .acquire (any (), anyInt (), anyInt (), anyLong (), any ())).thenReturn (
679
+ when (sp0 .acquire (any (), anyInt (), anyInt (), anyLong (), any (), any () )).thenReturn (
680
680
createShareAcquiredRecords (new ShareFetchResponseData .AcquiredRecords ().setFirstOffset (0 ).setLastOffset (3 ).setDeliveryCount ((short ) 1 )));
681
681
doAnswer (invocation -> buildLogReadResult (List .of (tp0 ))).when (replicaManager ).readFromLog (any (), any (), any (ReplicaQuota .class ), anyBoolean ());
682
682
@@ -919,15 +919,15 @@ public void testPartitionMaxBytesFromUniformStrategyWhenAllPartitionsAreAcquirab
919
919
new CompletableFuture <>(), List .of (tp0 , tp1 , tp2 , tp3 , tp4 ), BATCH_SIZE , MAX_FETCH_RECORDS ,
920
920
BROKER_TOPIC_STATS );
921
921
922
- when (sp0 .acquire (anyString (), anyInt (), anyInt (), anyLong (), any (FetchPartitionData .class ))).thenReturn (
922
+ when (sp0 .acquire (anyString (), anyInt (), anyInt (), anyLong (), any (FetchPartitionData .class ), any () )).thenReturn (
923
923
createShareAcquiredRecords (new ShareFetchResponseData .AcquiredRecords ().setFirstOffset (0 ).setLastOffset (3 ).setDeliveryCount ((short ) 1 )));
924
- when (sp1 .acquire (anyString (), anyInt (), anyInt (), anyLong (), any (FetchPartitionData .class ))).thenReturn (
924
+ when (sp1 .acquire (anyString (), anyInt (), anyInt (), anyLong (), any (FetchPartitionData .class ), any () )).thenReturn (
925
925
createShareAcquiredRecords (new ShareFetchResponseData .AcquiredRecords ().setFirstOffset (0 ).setLastOffset (3 ).setDeliveryCount ((short ) 1 )));
926
- when (sp2 .acquire (anyString (), anyInt (), anyInt (), anyLong (), any (FetchPartitionData .class ))).thenReturn (
926
+ when (sp2 .acquire (anyString (), anyInt (), anyInt (), anyLong (), any (FetchPartitionData .class ), any () )).thenReturn (
927
927
createShareAcquiredRecords (new ShareFetchResponseData .AcquiredRecords ().setFirstOffset (0 ).setLastOffset (3 ).setDeliveryCount ((short ) 1 )));
928
- when (sp3 .acquire (anyString (), anyInt (), anyInt (), anyLong (), any (FetchPartitionData .class ))).thenReturn (
928
+ when (sp3 .acquire (anyString (), anyInt (), anyInt (), anyLong (), any (FetchPartitionData .class ), any () )).thenReturn (
929
929
createShareAcquiredRecords (new ShareFetchResponseData .AcquiredRecords ().setFirstOffset (0 ).setLastOffset (3 ).setDeliveryCount ((short ) 1 )));
930
- when (sp4 .acquire (anyString (), anyInt (), anyInt (), anyLong (), any (FetchPartitionData .class ))).thenReturn (
930
+ when (sp4 .acquire (anyString (), anyInt (), anyInt (), anyLong (), any (FetchPartitionData .class ), any () )).thenReturn (
931
931
createShareAcquiredRecords (new ShareFetchResponseData .AcquiredRecords ().setFirstOffset (0 ).setLastOffset (3 ).setDeliveryCount ((short ) 1 )));
932
932
933
933
// All 5 partitions are acquirable.
@@ -1015,9 +1015,9 @@ public void testPartitionMaxBytesFromUniformStrategyWhenFewPartitionsAreAcquirab
1015
1015
new CompletableFuture <>(), List .of (tp0 , tp1 , tp2 , tp3 , tp4 ), BATCH_SIZE , MAX_FETCH_RECORDS ,
1016
1016
BROKER_TOPIC_STATS );
1017
1017
1018
- when (sp0 .acquire (anyString (), anyInt (), anyInt (), anyLong (), any (FetchPartitionData .class ))).thenReturn (
1018
+ when (sp0 .acquire (anyString (), anyInt (), anyInt (), anyLong (), any (FetchPartitionData .class ), any () )).thenReturn (
1019
1019
createShareAcquiredRecords (new ShareFetchResponseData .AcquiredRecords ().setFirstOffset (0 ).setLastOffset (3 ).setDeliveryCount ((short ) 1 )));
1020
- when (sp1 .acquire (anyString (), anyInt (), anyInt (), anyLong (), any (FetchPartitionData .class ))).thenReturn (
1020
+ when (sp1 .acquire (anyString (), anyInt (), anyInt (), anyLong (), any (FetchPartitionData .class ), any () )).thenReturn (
1021
1021
createShareAcquiredRecords (new ShareFetchResponseData .AcquiredRecords ().setFirstOffset (0 ).setLastOffset (3 ).setDeliveryCount ((short ) 1 )));
1022
1022
1023
1023
// Only 2 out of 5 partitions are acquirable.
0 commit comments