github.com/hack0072008/kafka-go@v1.0.1/protocol/addoffsetstotxn/addoffsetstotxn_test.go (about) 1 package addoffsetstotxn_test 2 3 import ( 4 "testing" 5 6 "github.com/hack0072008/kafka-go/protocol/addoffsetstotxn" 7 "github.com/hack0072008/kafka-go/protocol/prototest" 8 ) 9 10 func TestAddOffsetsToTxnRequest(t *testing.T) { 11 for _, version := range []int16{0, 1, 2, 3} { 12 prototest.TestRequest(t, version, &addoffsetstotxn.Request{ 13 TransactionalID: "transactional-id-0", 14 ProducerID: 1, 15 ProducerEpoch: 10, 16 GroupID: "group-id-0", 17 }) 18 } 19 } 20 21 func TestAddOffsetsToTxnResponse(t *testing.T) { 22 for _, version := range []int16{0, 1, 2, 3} { 23 prototest.TestResponse(t, version, &addoffsetstotxn.Response{ 24 ThrottleTimeMs: 10, 25 ErrorCode: 1, 26 }) 27 } 28 }