Skip to content

Commit

Permalink
cloud_storage/tests: match topic name when deleting manifest
Browse files Browse the repository at this point in the history
when deleting manifest in test_missing_partition we should match topic
name with the manifest path.
  • Loading branch information
abhijat committed Jul 29, 2022
1 parent b1f224c commit 65f3fea
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/rptest/tests/topic_recovery_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,14 +345,16 @@ class MissingPartition(BaseCase):
only one key).
"""

topics = (TopicSpec(name='panda-topic',
topic_name = 'panda-topic'
topics = (TopicSpec(name=topic_name,
partition_count=2,
replication_factor=3), )

def __init__(self, s3_client, kafka_tools, rpk_client, s3_bucket, logger,
rpk_producer_maker):
self._part1_offset = 0
self._part1_num_segments = 0
self._topic_name_to_delete = self.topics[0].name
super(MissingPartition,
self).__init__(s3_client, kafka_tools, rpk_client, s3_bucket,
logger, rpk_producer_maker)
Expand All @@ -379,7 +381,7 @@ def _find_and_remove_partition_manifest(self):
for key in self._list_objects():
if key.endswith("/manifest.json"):
attr = parse_s3_manifest_path(key)
if attr.ntp.partition == 0:
if attr.ntp.partition == 0 and attr.ntp.topic == self.topic_name:
manifest = key
else:
assert attr.ntp.partition == 1
Expand Down

0 comments on commit 65f3fea

Please sign in to comment.