Skip to content

Commit

Permalink
Merge pull request #4506 from mmaslankaprv/fetch-long-poll-fix
Browse files Browse the repository at this point in the history
Fetch long poll fix
  • Loading branch information
mmaslankaprv committed May 2, 2022
2 parents 97bc2f6 + c4382e1 commit c4eefc9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
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

0 comments on commit c4eefc9

Please sign in to comment.