Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: IBM/sarama
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 398d22e67c4ef40397c244ec631ef4a5cc1ecb58
Choose a base ref
..
head repository: IBM/sarama
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fd745c04b8cc9ff4c986b7fbbd327f9e08b80cfc
Choose a head ref
Showing with 10 additions and 4 deletions.
  1. +10 −4 functional_producer_test.go
14 changes: 10 additions & 4 deletions functional_producer_test.go
Original file line number Diff line number Diff line change
@@ -812,15 +812,21 @@ func testProducingMessages(t *testing.T, config *Config, minVersion KafkaVersion
config.Consumer.Return.Errors = true

kafkaVersions := map[KafkaVersion]bool{}
if upper, err := ParseKafkaVersion(os.Getenv("KAFKA_VERSION")); err != nil {
kafkaVersions[upper] = true
// KIP-896 dictates a minimum lower bound of 2.1 protocol for Kafka 4.0 onwards
if upper.IsAtLeast(V4_0_0_0) {
if !minVersion.IsAtLeast(V2_1_0_0) {
minVersion = V2_1_0_0
}
}
}

for _, v := range []KafkaVersion{MinVersion, V0_10_0_0, V0_11_0_0, V1_0_0_0, V2_0_0_0, V2_1_0_0} {
if v.IsAtLeast(minVersion) {
kafkaVersions[v] = true
}
}
if upper, err := ParseKafkaVersion(os.Getenv("KAFKA_VERSION")); err != nil {
kafkaVersions[upper] = true
}

for version := range kafkaVersions {
name := t.Name() + "-v" + version.String()
t.Run(name, func(t *testing.T) {