@@ -193,7 +193,7 @@ public void testIllegalGeneration() {
193
193
194
194
// illegal_generation will cause re-partition
195
195
subscriptions .subscribe (Arrays .asList (topicName ), rebalanceListener );
196
- subscriptions .changePartitionAssignment (Collections .singletonList (tp ));
196
+ subscriptions .assignFromSubscribed (Collections .singletonList (tp ));
197
197
198
198
time .sleep (sessionTimeoutMs );
199
199
RequestFuture <Void > future = coordinator .sendHeartbeatRequest (); // should send out the heartbeat
@@ -217,7 +217,7 @@ public void testUnknownConsumerId() {
217
217
218
218
// illegal_generation will cause re-partition
219
219
subscriptions .subscribe (Arrays .asList (topicName ), rebalanceListener );
220
- subscriptions .changePartitionAssignment (Collections .singletonList (tp ));
220
+ subscriptions .assignFromSubscribed (Collections .singletonList (tp ));
221
221
222
222
time .sleep (sessionTimeoutMs );
223
223
RequestFuture <Void > future = coordinator .sendHeartbeatRequest (); // should send out the heartbeat
@@ -413,7 +413,7 @@ public void testInvalidSessionTimeout() {
413
413
414
414
@ Test
415
415
public void testCommitOffsetOnly () {
416
- subscriptions .assign (Arrays .asList (tp ));
416
+ subscriptions .assignFromUser (Arrays .asList (tp ));
417
417
418
418
client .prepareResponse (consumerMetadataResponse (node , Errors .NONE .code ()));
419
419
coordinator .ensureCoordinatorKnown ();
@@ -430,7 +430,7 @@ public void testCommitOffsetOnly() {
430
430
431
431
@ Test
432
432
public void testCommitOffsetMetadata () {
433
- subscriptions .assign (Arrays .asList (tp ));
433
+ subscriptions .assignFromUser (Arrays .asList (tp ));
434
434
435
435
client .prepareResponse (consumerMetadataResponse (node , Errors .NONE .code ()));
436
436
coordinator .ensureCoordinatorKnown ();
@@ -473,7 +473,7 @@ public void testResetGeneration() {
473
473
// now switch to manual assignment
474
474
subscriptions .unsubscribe ();
475
475
coordinator .resetGeneration ();
476
- subscriptions .assign (Arrays .asList (tp ));
476
+ subscriptions .assignFromUser (Arrays .asList (tp ));
477
477
478
478
// the client should not reuse generation/memberId from auto-subscribed generation
479
479
client .prepareResponse (new MockClient .RequestMatcher () {
@@ -612,7 +612,7 @@ public void testRefreshOffset() {
612
612
client .prepareResponse (consumerMetadataResponse (node , Errors .NONE .code ()));
613
613
coordinator .ensureCoordinatorKnown ();
614
614
615
- subscriptions .assign (Arrays .asList (tp ));
615
+ subscriptions .assignFromUser (Arrays .asList (tp ));
616
616
subscriptions .needRefreshCommits ();
617
617
client .prepareResponse (offsetFetchResponse (tp , Errors .NONE .code (), "" , 100L ));
618
618
coordinator .refreshCommittedOffsetsIfNeeded ();
@@ -625,7 +625,7 @@ public void testRefreshOffsetLoadInProgress() {
625
625
client .prepareResponse (consumerMetadataResponse (node , Errors .NONE .code ()));
626
626
coordinator .ensureCoordinatorKnown ();
627
627
628
- subscriptions .assign (Arrays .asList (tp ));
628
+ subscriptions .assignFromUser (Arrays .asList (tp ));
629
629
subscriptions .needRefreshCommits ();
630
630
client .prepareResponse (offsetFetchResponse (tp , Errors .OFFSET_LOAD_IN_PROGRESS .code (), "" , 100L ));
631
631
client .prepareResponse (offsetFetchResponse (tp , Errors .NONE .code (), "" , 100L ));
@@ -639,7 +639,7 @@ public void testRefreshOffsetNotCoordinatorForConsumer() {
639
639
client .prepareResponse (consumerMetadataResponse (node , Errors .NONE .code ()));
640
640
coordinator .ensureCoordinatorKnown ();
641
641
642
- subscriptions .assign (Arrays .asList (tp ));
642
+ subscriptions .assignFromUser (Arrays .asList (tp ));
643
643
subscriptions .needRefreshCommits ();
644
644
client .prepareResponse (offsetFetchResponse (tp , Errors .NOT_COORDINATOR_FOR_GROUP .code (), "" , 100L ));
645
645
client .prepareResponse (consumerMetadataResponse (node , Errors .NONE .code ()));
@@ -654,7 +654,7 @@ public void testRefreshOffsetWithNoFetchableOffsets() {
654
654
client .prepareResponse (consumerMetadataResponse (node , Errors .NONE .code ()));
655
655
coordinator .ensureCoordinatorKnown ();
656
656
657
- subscriptions .assign (Arrays .asList (tp ));
657
+ subscriptions .assignFromUser (Arrays .asList (tp ));
658
658
subscriptions .needRefreshCommits ();
659
659
client .prepareResponse (offsetFetchResponse (tp , Errors .NONE .code (), "" , -1L ));
660
660
coordinator .refreshCommittedOffsetsIfNeeded ();
0 commit comments