Browse Source

Add a test

Evan Huus 10 years ago
parent
commit
5d12edf304
1 changed files with 8 additions and 0 deletions
  1. 8 0
      consumer_metadata_response_test.go

+ 8 - 0
consumer_metadata_response_test.go

@@ -58,4 +58,12 @@ func TestConsumerMetadataResponseSuccess(t *testing.T) {
 	if response.CoordinatorPort != 0xCCDD {
 	if response.CoordinatorPort != 0xCCDD {
 		t.Error("Decoding produced incorrect coordinator port.")
 		t.Error("Decoding produced incorrect coordinator port.")
 	}
 	}
+
+	if response.Coordinator.ID() != 0xAB {
+		t.Error("Decoding produced incorrect coordinator ID.")
+	}
+
+	if response.Coordinator.Addr() != "foo:52445" {
+		t.Error("Decoding produced incorrect coordinator address.")
+	}
 }
 }