heartbeat_request_test.go 410 B

12345678910111213141516171819
  1. package sarama
  2. import "testing"
  3. var (
  4. basicHeartbeatRequest = []byte{
  5. 0, 3, 'f', 'o', 'o', // Group ID
  6. 0x00, 0x01, 0x02, 0x03, // Generatiuon ID
  7. 0, 3, 'b', 'a', 'z', // Member ID
  8. }
  9. )
  10. func TestHeartbeatRequest(t *testing.T) {
  11. request := new(HeartbeatRequest)
  12. request.GroupId = "foo"
  13. request.GenerationId = 66051
  14. request.MemberId = "baz"
  15. testRequest(t, "basic", request, basicHeartbeatRequest)
  16. }