-
Notifications
You must be signed in to change notification settings - Fork 15.1k
KAFKA-18156: VerifiableConsumer should ignore "--session-timeout" when using CONSUMER protocol #18036
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KAFKA-18156: VerifiableConsumer should ignore "--session-timeout" when using CONSUMER protocol #18036
Changes from all commits
a74b2fc
64c61d5
2084983
8a3ccc4
84b078a
892a08d
5d77e9e
b876ca6
eb5047e
90d9337
bc10813
84665d2
7ad29c5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,13 +24,12 @@ class VerifiableConsumerTest(KafkaTest): | |
| PRODUCER_REQUEST_TIMEOUT_SEC = 30 | ||
|
|
||
| def __init__(self, test_context, num_consumers=1, num_producers=0, | ||
| group_id="test_group_id", session_timeout_sec=10, **kwargs): | ||
| group_id="test_group_id", **kwargs): | ||
| super(VerifiableConsumerTest, self).__init__(test_context, **kwargs) | ||
| self.num_consumers = num_consumers | ||
| self.num_producers = num_producers | ||
| self.group_id = group_id | ||
| self.session_timeout_sec = session_timeout_sec | ||
| self.consumption_timeout_sec = max(self.PRODUCER_REQUEST_TIMEOUT_SEC + 5, 2 * session_timeout_sec) | ||
| self.consumption_timeout_sec = self.PRODUCER_REQUEST_TIMEOUT_SEC + 5 | ||
|
|
||
| def _all_partitions(self, topic, num_partitions): | ||
| partitions = set() | ||
|
|
@@ -56,7 +55,7 @@ def min_cluster_size(self): | |
| def setup_consumer(self, topic, static_membership=False, enable_autocommit=False, | ||
| assignment_strategy="org.apache.kafka.clients.consumer.RangeAssignor", group_remote_assignor="range", **kwargs): | ||
| return VerifiableConsumer(self.test_context, self.num_consumers, self.kafka, | ||
| topic, self.group_id, static_membership=static_membership, session_timeout_sec=self.session_timeout_sec, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Replace Dynamic Timeouts with Constants Remove Use Cases of Increasing session_timeout_sec
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tested e2e client again. And looks like it was tracked by https://issues.apache.org/jira/browse/KAFKA-18194 |
||
| topic, self.group_id, static_membership=static_membership, | ||
| assignment_strategy=assignment_strategy, enable_autocommit=enable_autocommit, | ||
| group_remote_assignor=group_remote_assignor, | ||
| log_level="TRACE", **kwargs) | ||
|
|
@@ -81,9 +80,9 @@ def await_consumed_messages(self, consumer, min_messages=1): | |
| def await_members(self, consumer, num_consumers): | ||
| # Wait until all members have joined the group | ||
| wait_until(lambda: len(consumer.joined_nodes()) == num_consumers, | ||
| timeout_sec=self.session_timeout_sec*2, | ||
| timeout_sec=60, | ||
| err_msg="Consumers failed to join in a reasonable amount of time") | ||
|
|
||
| def await_all_members(self, consumer): | ||
| self.await_members(consumer, self.num_consumers) | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these 2 lines are duplicate code, see L245, L246