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

Function TestVersionMatrixZstd

functional_consumer_test.go:182–199  ·  view source on GitHub ↗

Support for zstd codec was introduced in v2.1.0.0

(t *testing.T)

Source from the content-addressed store, hash-verified

180
181// Support for zstd codec was introduced in v2.1.0.0
182func TestVersionMatrixZstd(t *testing.T) {
183 checkKafkaVersion(t, "2.1.0")
184 metrics.UseNilMetrics = true // disable Sarama's go-metrics library
185 t.Cleanup(func() {
186 metrics.UseNilMetrics = false
187 })
188 setupFunctionalTest(t)
189 defer teardownFunctionalTest(t)
190
191 // Produce lot's of message with all possible combinations of supported
192 // protocol versions starting with v2.1.0.0 (first where zstd was supported)
193 testVersions := versionRange(V2_1_0_0)
194 allCodecs := []CompressionCodec{CompressionZSTD}
195 producedMessages := produceMsgs(t, testVersions, allCodecs, 17, 100, false)
196
197 // When/Then
198 consumeMsgs(t, testVersions, producedMessages)
199}
200
201func TestVersionMatrixIdempotent(t *testing.T) {
202 metrics.UseNilMetrics = true // disable Sarama's go-metrics library

Callers

nothing calls this directly

Calls 7

checkKafkaVersionFunction · 0.85
setupFunctionalTestFunction · 0.85
teardownFunctionalTestFunction · 0.85
versionRangeFunction · 0.85
produceMsgsFunction · 0.85
consumeMsgsFunction · 0.85
CleanupMethod · 0.65

Tested by

no test coverage detected