(t *testing.T)
| 320 | } |
| 321 | |
| 322 | func TestMetadataResponseWithThrottleTime(t *testing.T) { |
| 323 | response := MetadataResponse{} |
| 324 | |
| 325 | testVersionDecodable(t, "no topics, no brokers, throttle time and cluster Id V3", &response, noBrokersNoTopicsWithThrottleTimeAndClusterIDV3, 3) |
| 326 | if response.ThrottleTimeMs != int32(16) { |
| 327 | t.Error("Decoding produced", response.ThrottleTimeMs, "should have been 16!") |
| 328 | } |
| 329 | if len(response.Brokers) != 0 { |
| 330 | t.Error("Decoding produced", response.Brokers, "should have been 0!") |
| 331 | } |
| 332 | if response.ControllerID != int32(1) { |
| 333 | t.Error("Decoding produced", response.ControllerID, "should have been 1!") |
| 334 | } |
| 335 | if *response.ClusterID != "clusterId" { |
| 336 | t.Error("Decoding produced", response.ClusterID, "should have been clusterId!") |
| 337 | } |
| 338 | if len(response.Topics) != 0 { |
| 339 | t.Error("Decoding produced", len(response.Topics), "should have been 0!") |
| 340 | } |
| 341 | } |
| 342 | |
| 343 | func TestMetadataResponseWithOfflineReplicasV5(t *testing.T) { |
| 344 | response := MetadataResponse{} |
nothing calls this directly
no test coverage detected