Skip to content

Commit

Permalink
fix(test): ensure versionRange is at least 2.1.0 for 4.0 kafka
Browse files Browse the repository at this point in the history
Signed-off-by: Dominic Evans <[email protected]>
  • Loading branch information
dnwe committed Dec 24, 2024
1 parent 016c7e3 commit 398d22e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions functional_consumer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,13 @@ func versionRange(lower KafkaVersion) []KafkaVersion {
upper = MaxVersion
}

// KIP-896 dictates a minimum lower bound of 2.1 protocol for Kafka 4.0 onwards
if upper.IsAtLeast(V4_0_0_0) {
if !lower.IsAtLeast(V2_1_0_0) {
lower = V2_1_0_0
}
}

versions := make([]KafkaVersion, 0, len(fvtRangeVersions))
for _, v := range fvtRangeVersions {
if !v.IsAtLeast(lower) {
Expand Down

0 comments on commit 398d22e

Please sign in to comment.