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

Function TestZstdConfigValidation

config_test.go:519–531  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

517}
518
519func TestZstdConfigValidation(t *testing.T) {
520 config := NewTestConfig()
521 config.Producer.Compression = CompressionZSTD
522 err := config.Validate()
523 var target ConfigurationError
524 if !errors.As(err, &target) || string(target) != "zstd compression requires Version >= V2_1_0_0" {
525 t.Error("Expected invalid zstd/kafka version error, got ", err)
526 }
527 config.Version = V2_1_0_0
528 if err := config.Validate(); err != nil {
529 t.Error("Expected zstd to work, got ", err)
530 }
531}
532
533func TestValidGroupInstanceId(t *testing.T) {
534 tests := []struct {

Callers

nothing calls this directly

Calls 3

ValidateMethod · 0.80
NewTestConfigFunction · 0.70
ErrorMethod · 0.65

Tested by

no test coverage detected