Skip to content

Commit

Permalink
tests: add test for fully enabling a partially disabled topic
Browse files Browse the repository at this point in the history
  • Loading branch information
ztlpn committed Nov 21, 2023
1 parent ba247c0 commit a9fb5f9
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/rptest/tests/recovery_mode_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def test_apis(self):
rpk = RpkTool(self.redpanda)
admin = Admin(self.redpanda)

topics = ["mytopic1", "mytopic2", "mytopic3"]
topics = ["mytopic1", "mytopic2", "mytopic3", "mytopic4"]
for topic in topics:
rpk.create_topic(topic, partitions=3, replicas=3)

Expand All @@ -263,6 +263,14 @@ def test_apis(self):
partition=1,
value=False)

admin.set_partitions_disabled(ns="kafka",
topic="mytopic4",
partition=0)
admin.set_partitions_disabled(ns="kafka",
topic="mytopic4",
value=False)


self.sync()

def pi(topic_partition, disabled=False):
Expand All @@ -279,6 +287,9 @@ def pi(topic_partition, disabled=False):
pi('mytopic3/0', True),
pi('mytopic3/1', False),
pi('mytopic3/2', True),
pi('mytopic4/0', False),
pi('mytopic4/1', False),
pi('mytopic4/2', False),
]

def filtered(topic, partition, disabled):
Expand Down

0 comments on commit a9fb5f9

Please sign in to comment.