(t *testing.T)
| 299 | } |
| 300 | |
| 301 | func TestMetadataResponseWithTopicsV1(t *testing.T) { |
| 302 | response := MetadataResponse{} |
| 303 | |
| 304 | testVersionDecodable(t, "topics, V1", &response, topicsNoBrokersMetadataResponseV1, 1) |
| 305 | if len(response.Brokers) != 0 { |
| 306 | t.Error("Decoding produced", len(response.Brokers), "brokers where there were none!") |
| 307 | } |
| 308 | if response.ControllerID != 4 { |
| 309 | t.Error("Decoding produced", response.ControllerID, "should have been 4!") |
| 310 | } |
| 311 | if len(response.Topics) != 2 { |
| 312 | t.Error("Decoding produced", len(response.Topics), "topics where there were 2!") |
| 313 | } |
| 314 | if response.Topics[0].IsInternal { |
| 315 | t.Error("Decoding produced", response.Topics[0], "topic0 should have been false!") |
| 316 | } |
| 317 | if !response.Topics[1].IsInternal { |
| 318 | t.Error("Decoding produced", response.Topics[1], "topic1 should have been true!") |
| 319 | } |
| 320 | } |
| 321 | |
| 322 | func TestMetadataResponseWithThrottleTime(t *testing.T) { |
| 323 | response := MetadataResponse{} |
nothing calls this directly
no test coverage detected