Skip to content

Commit 39b68eb

Browse files
committed
Update kafka broker test matrix; test against 3.9.0
1 parent 1775f43 commit 39b68eb

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

.github/workflows/python-package.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ jobs:
2929
- "0.11.0.3"
3030
- "1.1.1"
3131
- "2.4.0"
32-
- "2.5.0"
33-
- "2.6.0"
32+
- "2.8.2"
33+
- "3.0.2"
34+
- "3.5.2"
35+
- "3.9.0"
3436
python:
3537
- "3.12"
3638
include:
@@ -41,13 +43,13 @@ jobs:
4143
# kafka: "2.6.0"
4244
# experimental: true
4345
- python: "3.8"
44-
kafka: "2.6.0"
46+
kafka: "3.9.0"
4547
- python: "3.9"
46-
kafka: "2.6.0"
48+
kafka: "3.9.0"
4749
- python: "3.10"
48-
kafka: "2.6.0"
50+
kafka: "3.9.0"
4951
- python: "3.11"
50-
kafka: "2.6.0"
52+
kafka: "3.9.0"
5153

5254
steps:
5355
- uses: actions/checkout@v4

kafka/conn.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,6 +1181,7 @@ def _infer_broker_version_from_api_versions(self, api_versions):
11811181
# in reverse order. As soon as we find one that works, return it
11821182
test_cases = [
11831183
# format (<broker version>, <needed struct>)
1184+
# Make sure to update consumer_integration test check when adding newer versions.
11841185
((2, 6, 0), DescribeClientQuotasRequest[0]),
11851186
((2, 5, 0), DescribeAclsRequest_v2),
11861187
((2, 4, 0), ProduceRequest[8]),

test/test_consumer_integration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414

1515
@pytest.mark.skipif(not env_kafka_version(), reason="No KAFKA_VERSION set")
16+
@pytest.mark.skipif(env_kafka_version()[:2] > (2, 6, 0), reason="KAFKA_VERSION newer than max inferred version")
1617
def test_kafka_version_infer(kafka_consumer_factory):
1718
consumer = kafka_consumer_factory()
1819
actual_ver_major_minor = env_kafka_version()[:2]

0 commit comments

Comments
 (0)