add_offsets_to_txn_request_test.go 421 B

1234567891011121314151617181920212223
  1. package sarama
  2. import "testing"
  3. var (
  4. addOffsetsToTxnRequest = []byte{
  5. 0, 3, 't', 'x', 'n',
  6. 0, 0, 0, 0, 0, 0, 31, 64,
  7. 0, 0,
  8. 0, 7, 'g', 'r', 'o', 'u', 'p', 'i', 'd',
  9. }
  10. )
  11. func TestAddOffsetsToTxnRequest(t *testing.T) {
  12. req := &AddOffsetsToTxnRequest{
  13. TransactionalID: "txn",
  14. ProducerID: 8000,
  15. ProducerEpoch: 0,
  16. GroupID: "groupid",
  17. }
  18. testRequest(t, "", req, addOffsetsToTxnRequest)
  19. }