consumer_metadata_request_test.go 452 B

12345678910111213141516171819
  1. package sarama
  2. import "testing"
  3. var (
  4. consumerMetadataRequestEmpty = []byte{
  5. 0x00, 0x00}
  6. consumerMetadataRequestString = []byte{
  7. 0x00, 0x06, 'f', 'o', 'o', 'b', 'a', 'r'}
  8. )
  9. func TestConsumerMetadataRequest(t *testing.T) {
  10. request := new(ConsumerMetadataRequest)
  11. testRequest(t, "empty string", request, consumerMetadataRequestEmpty)
  12. request.ConsumerGroup = "foobar"
  13. testRequest(t, "with string", request, consumerMetadataRequestString)
  14. }