use of org.apache.kafka.common.requests.TxnOffsetCommitRequest in project kafka by apache.
the class TransactionManagerTest method prepareTxnOffsetCommitResponse.
private void prepareTxnOffsetCommitResponse(final String consumerGroupId, final long producerId, final short producerEpoch, Map<TopicPartition, Errors> txnOffsetCommitResponse) {
client.prepareResponse(request -> {
TxnOffsetCommitRequest txnOffsetCommitRequest = (TxnOffsetCommitRequest) request;
assertEquals(consumerGroupId, txnOffsetCommitRequest.data().groupId());
assertEquals(producerId, txnOffsetCommitRequest.data().producerId());
assertEquals(producerEpoch, txnOffsetCommitRequest.data().producerEpoch());
return true;
}, new TxnOffsetCommitResponse(0, txnOffsetCommitResponse));
}
Aggregations