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


##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/OffsetMetadataManagerTest.java:
##########
@@ -2536,14 +2812,28 @@ public void 
testConsumerGroupOffsetDeleteWithPendingTransactionalOffsets() {
             "foo",
             true
         );
+        verifyOffsetDeleteWithPendingTransactionalOffsets(context, group);
+    }
+    
+    @Test
+    public void testStreamsGroupOffsetDeleteWithPendingTransactionalOffsets() {
+        OffsetMetadataManagerTestContext context = new 
OffsetMetadataManagerTestContext.Builder().build();
+        StreamsGroup group = 
context.groupMetadataManager.getOrMaybeCreatePersistedStreamsGroup(
+            "foo",
+            true
+        );
+        verifyOffsetDeleteWithPendingTransactionalOffsets(context, group);
+    }
+
+    private static void 
verifyOffsetDeleteWithPendingTransactionalOffsets(OffsetMetadataManagerTestContext
 context, Group group) {
         context.commitOffset(10L, "foo", "bar", 0, 100L, 0, 
context.time.milliseconds());
         assertFalse(group.isSubscribedToTopic("bar"));
         context.testOffsetDeleteWith("foo", "bar", 0, Errors.NONE);
         assertFalse(context.hasOffset("foo", "bar", 0));
     }
 
     @ParameterizedTest
-    @EnumSource(value = Group.GroupType.class, names = {"CLASSIC", "CONSUMER"})
+    @EnumSource(value = Group.GroupType.class, names = {"CLASSIC", "CONSUMER", 
"STREAMS"})

Review Comment:
   Some existing tests used this kind of parametrization. I used it as well in 
the test where we already had it, however, in the general case the setup was 
often a little different between the group types or existing parametrization 
made adopting this pattern painful, so I opted for a separate test method above 
but shared everything after the setup.



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