heartbeat_request_test.go 441 B

123456789101112131415161718192021
  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. var request *HeartbeatRequest
  12. request = new(HeartbeatRequest)
  13. request.GroupID = "foo"
  14. request.GenerationID = 66051
  15. request.MemberID = "baz"
  16. testRequest(t, "basic", request, basicHeartbeatRequest)
  17. }