MCPcopy
hub / github.com/IBM/sarama / NewTestConfig

Function NewTestConfig

config_test.go:19–26  ·  view source on GitHub ↗

NewTestConfig returns a config meant to be used by tests. Due to inconsistencies with the request versions the clients send using the default Kafka version and the response versions our mocks use, we default to the minimum Kafka version in most tests

()

Source from the content-addressed store, hash-verified

17// Due to inconsistencies with the request versions the clients send using the default Kafka version
18// and the response versions our mocks use, we default to the minimum Kafka version in most tests
19func NewTestConfig() *Config {
20 config := NewConfig()
21 config.ApiVersionsRequest = false
22 config.Consumer.Retry.Backoff = 0
23 config.Producer.Retry.Backoff = 0
24 config.Version = MinVersion
25 return config
26}
27
28func TestDefaultConfigValidates(t *testing.T) {
29 config := NewTestConfig()

Calls 1

NewConfigFunction · 0.70

Tested by

no test coverage detected