Skip to content
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

Fetch long poll fix #4506

Merged
merged 2 commits into from
May 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/rptest/services/kafka_cli_consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def __init__(self,
offset=None,
partitions=None,
isolation_level=None,
from_beginning=False,
consumer_properties={}):
super(KafkaCliConsumer, self).__init__(context, num_nodes=1)
self._redpanda = redpanda
Expand All @@ -32,6 +33,7 @@ def __init__(self,
self._offset = offset
self._partitions = partitions
self._isolation_level = isolation_level
self._from_beginning = from_beginning
self._consumer_properties = consumer_properties
self._stopping = threading.Event()
assert self._partitions is not None or self._group is not None, "either partitions or group have to be set"
Expand All @@ -56,6 +58,8 @@ def _worker(self, _, node):
cmd += ['--partition', ','.join(self._partitions)]
if self._isolation_level is not None:
cmd += ["--isolation-level", str(self._isolation_level)]
if self._from_beginning:
cmd += ["--from-beginning"]
for k, v in self._consumer_properties.items():
cmd += ['--consumer-property', f"{k}={v}"]

Expand Down
1 change: 1 addition & 0 deletions tests/rptest/tests/fetch_long_poll_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def fetch_long_poll_test(self):
self.redpanda,
topic=topic.name,
group='test-gr-1',
from_beginning=True,
consumer_properties={
'fetch.min.bytes': 1024,
'fetch.max.wait.ms': 1000,
Expand Down