end_txn_request_test.go 350 B

1234567891011121314151617181920212223
  1. package sarama
  2. import "testing"
  3. var (
  4. endTxnRequest = []byte{
  5. 0, 3, 't', 'x', 'n',
  6. 0, 0, 0, 0, 0, 0, 31, 64,
  7. 0, 1,
  8. 1,
  9. }
  10. )
  11. func TestEndTxnRequest(t *testing.T) {
  12. req := &EndTxnRequest{
  13. TransactionalID: "txn",
  14. ProducerID: 8000,
  15. ProducerEpoch: 1,
  16. TransactionResult: true,
  17. }
  18. testRequest(t, "", req, endTxnRequest)
  19. }