heartbeat_response_test.go 397 B

123456789101112131415161718
  1. package sarama
  2. import "testing"
  3. var (
  4. heartbeatResponseNoError = []byte{
  5. 0x00, 0x00}
  6. )
  7. func TestHeartbeatResponse(t *testing.T) {
  8. var response *HeartbeatResponse
  9. response = new(HeartbeatResponse)
  10. testVersionDecodable(t, "no error", response, heartbeatResponseNoError, 0)
  11. if response.Err != ErrNoError {
  12. t.Error("Decoding error failed: no error expected but found", response.Err)
  13. }
  14. }