(t *testing.T)
| 503 | } |
| 504 | |
| 505 | func TestLZ4ConfigValidation(t *testing.T) { |
| 506 | config := NewTestConfig() |
| 507 | config.Producer.Compression = CompressionLZ4 |
| 508 | err := config.Validate() |
| 509 | var target ConfigurationError |
| 510 | if !errors.As(err, &target) || string(target) != "lz4 compression requires Version >= V0_10_0_0" { |
| 511 | t.Error("Expected invalid lz4/kafka version error, got ", err) |
| 512 | } |
| 513 | config.Version = V0_10_0_0 |
| 514 | if err := config.Validate(); err != nil { |
| 515 | t.Error("Expected lz4 to work, got ", err) |
| 516 | } |
| 517 | } |
| 518 | |
| 519 | func TestZstdConfigValidation(t *testing.T) { |
| 520 | config := NewTestConfig() |
nothing calls this directly
no test coverage detected