use of org.apache.kafka.common.requests.EndTxnRequest in project apache-kafka-on-k8s by banzaicloud.
the class TransactionManagerTest method endTxnMatcher.
private MockClient.RequestMatcher endTxnMatcher(final TransactionResult result, final long pid, final short epoch) {
return new MockClient.RequestMatcher() {
@Override
public boolean matches(AbstractRequest body) {
EndTxnRequest endTxnRequest = (EndTxnRequest) body;
assertEquals(transactionalId, endTxnRequest.transactionalId());
assertEquals(pid, endTxnRequest.producerId());
assertEquals(epoch, endTxnRequest.producerEpoch());
assertEquals(result, endTxnRequest.command());
return true;
}
};
}
Aggregations