heartbeat_response_test.go 364 B

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