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 97c619a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/rptest/tests/topic_recovery_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,8 @@ 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), )

Expand Down Expand Up @@ -377,9 +378,9 @@ def _find_and_remove_partition_manifest(self):
consistent in Minio S3 implementation)."""
manifest = None
for key in self._list_objects():
if key.endswith("/manifest.json"):
if key.endswith("/manifest.json") and self.topic_name in key:
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 97c619a

Please sign in to comment.