dajac commented on code in PR #15237:
URL: https://github.com/apache/kafka/pull/15237#discussion_r1470775879


##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/OffsetMetadataManagerTest.java:
##########
@@ -3050,6 +3060,53 @@ public void testOffsetDeletionsSensor() {
         verify(context.metrics).record(OFFSET_DELETIONS_SENSOR_NAME, 2);
     }
 
+    @Test
+    public void testOnPartitionsDeleted() {
+        OffsetMetadataManagerTestContext context = new 
OffsetMetadataManagerTestContext.Builder().build();
+
+        // Commit offsets.
+        context.commitOffset("grp-0", "foo", 1, 100, 1, 
context.time.milliseconds());
+        context.commitOffset("grp-0", "foo", 2, 200, 1, 
context.time.milliseconds());
+        context.commitOffset("grp-0", "foo", 3, 300, 1, 
context.time.milliseconds());
+
+        context.commitOffset("grp-1", "bar", 1, 100, 1, 
context.time.milliseconds());
+        context.commitOffset("grp-1", "bar", 2, 200, 1, 
context.time.milliseconds());
+        context.commitOffset("grp-1", "bar", 3, 300, 1, 
context.time.milliseconds());
+
+        context.commitOffset(100L, "grp-2", "foo", 1, 100, 1, 
context.time.milliseconds());
+        context.commitOffset(100L, "grp-2", "foo", 2, 200, 1, 
context.time.milliseconds());
+        context.commitOffset(100L, "grp-2", "foo", 3, 300, 1, 
context.time.milliseconds());
+
+        // Delete partitions.
+        List<Record> records = context.deletePartitions(Arrays.asList(
+            new TopicPartition("foo", 1),

Review Comment:
   Not really. I wanted more than one so I used three ;).



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