lucasbru commented on code in PR #15401:
URL: https://github.com/apache/kafka/pull/15401#discussion_r1526107034


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/HeartbeatRequestManager.java:
##########
@@ -116,14 +116,14 @@ public class HeartbeatRequestManager implements 
RequestManager {
     private final HeartbeatMetricsManager metricsManager;
 
     public HeartbeatRequestManager(
-        final LogContext logContext,
-        final Time time,
-        final ConsumerConfig config,
-        final CoordinatorRequestManager coordinatorRequestManager,
-        final SubscriptionState subscriptions,
-        final MembershipManager membershipManager,
-        final BackgroundEventHandler backgroundEventHandler,
-        final Metrics metrics) {
+            final LogContext logContext,
+            final Time time,

Review Comment:
   Please don't submit white-space only changes unless you are otherwise 
editing that fragment of the code.



##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/HeartbeatRequestManagerTest.java:
##########
@@ -428,9 +429,28 @@ public void testHeartbeatState() {
         assertEquals(memberId, data.memberId());
         assertEquals(0, data.memberEpoch());
         assertNull(data.instanceId());
-        assertEquals(-1, data.rebalanceTimeoutMs());
+        assertEquals(DEFAULT_MAX_POLL_INTERVAL_MS, data.rebalanceTimeoutMs());
         assertEquals(Collections.singletonList(topic), 
data.subscribedTopicNames());
-        assertNull(data.serverAssignor());
+        assertEquals(ConsumerTestBuilder.DEFAULT_REMOTE_ASSIGNOR, 
data.serverAssignor());
+        assertNull(data.topicPartitions());
+        membershipManager.onHeartbeatRequestSent();
+        assertEquals(MemberState.JOINING, membershipManager.state());
+
+        // Explicitly change the subscription when gets fenced
+        String newTopic = "topic2";
+        when(membershipManager.state()).thenReturn(MemberState.FENCED);
+        subscriptions.subscribe(Collections.singleton(newTopic), 
Optional.empty());

Review Comment:
   The test is still subscribing to a new topic



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to