Skip to content
代码片段 群组 项目
未验证 提交 5da26608 编辑于 作者: Yang Yu's avatar Yang Yu 提交者: GitHub
浏览文件

MINOR: Fix broker storage failure test (#6968)

When Kibosh removes storage fault, there seems to be cases where the fault is not removed in a timely manner. This pr forces recreate of the log dir to ensure storage fault is removed.
上级 9e0899e0
No related branches found
No related tags found
无相关合并请求
......@@ -111,8 +111,13 @@ class BrokerStorageFailureTest(EndToEndTest):
wait_until(lambda: not self.kafka.kibosh.get_current_faults(leader_node),
timeout_sec=60,
err_msg="Faults failed to clear in %ds." % 60)
self.kafka.start_node(leader_node)
wait_until(lambda: self.kafka.is_registered(leader_node),
timeout_sec=60,
err_msg="Old leader failed to register in %ds." % 60)
# wait until the old leader is re-elected
wait_until(lambda: self.kafka.leader(self.topic, partition_id) == leader_node,
timeout_sec=60,
......
......@@ -167,6 +167,9 @@ class KafkaStorageFailures:
timeout_sec=60,
err_msg="Kafka failed to crush in %ds." % 60)
# delete Kafka root (new empty volume replaces old volume)
node.account.ssh("sudo rm -rf -- %s" % self.kafka.PERSISTENT_ROOT + "/*")
self.kafka.logger.info("Kafka crushed when %s is injected." % KafkaStorageFailures.PERMISSION_DENY)
def inject_data_corruption(self, node, prefix=[""], suffix=""):
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册