Skip to content

Commit

Permalink
Merge pull request redpanda-data#24019 from WillemKauf/delete_records…
Browse files Browse the repository at this point in the history
…_test_describe_topics_fix

[CORE-7770]: `rptest`: use `wait_until_result` wrapper in `delete_records_test.py`
  • Loading branch information
WillemKauf authored Nov 8, 2024
2 parents 234b285 + 599f24f commit 6a181f7
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions tests/rptest/tests/delete_records_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,19 @@ def _apply_local_retention_settings(self):
self.local_retention)

def get_topic_info(self, topic_name):
topics_info = list(self.rpk.describe_topic(topic_name))
self.logger.info(topics_info)
assert len(topics_info) == 1
return topics_info[0]
def describe_topic():
topics_info = list(self.rpk.describe_topic(topic_name))
if len(topics_info) > 0:
self.logger.info(topics_info)
return True, topics_info[0]
else:
return False

topic_info = wait_until_result(describe_topic,
timeout_sec=15,
backoff_sec=1,
err_msg="Couldn't get topic info")
return topic_info

def wait_until_records(self,
topic_name,
Expand Down

0 comments on commit 6a181f7

Please sign in to comment.