Search in sources :

Example 1 with OffsetDeleteRequest

use of org.apache.kafka.common.requests.OffsetDeleteRequest in project kafka by apache.

the class DeleteConsumerGroupOffsetsHandlerTest method testBuildRequest.

@Test
public void testBuildRequest() {
    DeleteConsumerGroupOffsetsHandler handler = new DeleteConsumerGroupOffsetsHandler(groupId, tps, logContext);
    OffsetDeleteRequest request = handler.buildRequest(1, singleton(CoordinatorKey.byGroupId(groupId))).build();
    assertEquals(groupId, request.data().groupId());
    assertEquals(2, request.data().topics().size());
    assertEquals(2, request.data().topics().find("t0").partitions().size());
    assertEquals(1, request.data().topics().find("t1").partitions().size());
}
Also used : OffsetDeleteRequest(org.apache.kafka.common.requests.OffsetDeleteRequest) Test(org.junit.jupiter.api.Test)

Aggregations

OffsetDeleteRequest (org.apache.kafka.common.requests.OffsetDeleteRequest)1 Test (org.junit.jupiter.api.Test)1