squah-confluent commented on code in PR #23688:
URL: https://github.com/apache/kafka/pull/23688#discussion_r4240352671


##########
core/src/test/scala/unit/kafka/server/ConsumerGroupHeartbeatRequestTest.scala:
##########
@@ -399,9 +445,29 @@ class ConsumerGroupHeartbeatRequestTest(cluster: 
ClusterInstance) extends GroupC
 
     // Verify the response.
     assertNotNull(consumerGroupHeartbeatResponse.data.memberId)
-    assertEquals(2, consumerGroupHeartbeatResponse.data.memberEpoch)
+    assertEquals(if (isConsumerAssignorOffloadEnabled) 1 else 2, 
consumerGroupHeartbeatResponse.data.memberEpoch)
     assertEquals(new ConsumerGroupHeartbeatResponseData.Assignment(), 
consumerGroupHeartbeatResponse.data.assignment)
 
+    // When assignor offload is enabled, the initial assignment is available 
in a later heartbeat.
+    if (isConsumerAssignorOffloadEnabled) {

Review Comment:
   Most of them are indeed not that useful. We can be more selective and ditch 
the tests whose stated purpose is testing validation for example.
   
   The remaining tests kept would be
   * `testConsumerGroupHeartbeatIsAccessibleWhenNewGroupCoordinatorIsEnabled` - 
It's the happy path test
   * `testConsumerGroupHeartbeatWithRegularExpression` - Regexes interact with 
assignments
   * 
`testRejoiningStaticMemberGetsAssignmentsBackWhenNewGroupCoordinatorIsEnabled` 
- Borderline choice
   * `testConsumerGroupHeartbeatRebalance` - Assignments with multiple members
   
   Tests not kept would be:
   * `testConsumerGroupHeartbeatIsInaccessibleWhenDisabledByStaticConfig`
   * `testConsumerGroupHeartbeatIsInaccessibleWhenFeatureFlagNotEnabled`
   * `testConsumerGroupHeartbeatWithInvalidRegularExpression`
   * `testEmptyConsumerGroupId`
   * `testConsumerGroupHeartbeatWithEmptySubscription` - Borderline choice
   * 
`testStaticMemberRemovedAfterSessionTimeoutExpiryWhenNewGroupCoordinatorIsEnabled`
   * `testUpdateConsumerGroupHeartbeatConfigSuccessful`
   * `testConsumerGroupHeartbeatFailureIfMemberIdMissingForVersionsAbove0`
   * `testMemberIdGeneratedOnServerWhenApiVersionIs0`
   * `testFencedMemberCanRejoinWithEpochZero`
   * `testDuplicateFullHeartbeatInStableState`
   * `testDuplicateFullHeartbeatWhileWaitingForPartitions`
   * `testDuplicateFullHeartbeatDuringRevocation`
   * `testDuplicateFullHeartbeatWithRevocationAck`
   * `testStaticMembersRejoinWithDifferentServerAssignor`



-- 
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