Skip to content

Commit fc2e732

Browse files
committed
Skipping consumer error tests for 'consumer' protocol for now as it uses session.timeout.ms
1 parent 57721e1 commit fc2e732

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

tests/integration/consumer/test_consumer_error.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
from confluent_kafka.error import ConsumeError
2323
from confluent_kafka.serialization import StringSerializer
24+
from tests.common import TestUtils
2425

2526

2627
def test_consume_error(kafka_cluster):
@@ -46,6 +47,14 @@ def test_consume_error(kafka_cluster):
4647
"Expected _PARTITION_EOF, not {}".format(exc_info)
4748

4849

50+
# Skipping the test for consumer protocol for now. Update the test to use
51+
# IncrementalAlterConfigs Admin operation to update
52+
# group.session.timeout.ms and enable the test again.
53+
@pytest.mark.skipif(TestUtils.use_group_protocol_consumer(),
54+
reason="session.timeout.ms is not supported on client side for "
55+
"consumer protocol. Update this test to use IncrementalAlterConfigs "
56+
"Admin operation to update group.session.timeout.ms and enable "
57+
"the test again.")
4958
def test_consume_error_commit(kafka_cluster):
5059
"""
5160
Tests to ensure that we handle messages with errors when commiting.
@@ -63,13 +72,21 @@ def test_consume_error_commit(kafka_cluster):
6372
try:
6473
# Since the session timeout value is low, JoinGroupRequest will fail
6574
# and we get error in a message while polling.
66-
m = consumer.poll(1)
75+
m = consumer.poll(2)
6776
consumer.commit(m)
6877
except KafkaException as e:
6978
assert e.args[0].code() == KafkaError._INVALID_ARG, \
7079
"Expected INVALID_ARG, not {}".format(e)
7180

7281

82+
# Skipping the test for consumer protocol for now. Update the test to use
83+
# IncrementalAlterConfigs Admin operation to update
84+
# group.session.timeout.ms and enable the test again.
85+
@pytest.mark.skipif(TestUtils.use_group_protocol_consumer(),
86+
reason="session.timeout.ms is not supported on client side for "
87+
"consumer protocol. Update this test to use IncrementalAlterConfigs "
88+
"Admin operation to update group.session.timeout.ms and enable "
89+
"the test again.")
7390
def test_consume_error_store_offsets(kafka_cluster):
7491
"""
7592
Tests to ensure that we handle messages with errors when storing offsets.
@@ -89,7 +106,7 @@ def test_consume_error_store_offsets(kafka_cluster):
89106
try:
90107
# Since the session timeout value is low, JoinGroupRequest will fail
91108
# and we get error in a message while polling.
92-
m = consumer.poll(1)
109+
m = consumer.poll(2)
93110
consumer.store_offsets(m)
94111
except KafkaException as e:
95112
assert e.args[0].code() == KafkaError._INVALID_ARG, \

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy