コード例 #1
0
ファイル: test_even.py プロジェクト: xuwenyihust/kafka-tools
    def test_skip_topic_different_rf(self):
        b1 = self.cluster.brokers[1]
        b2 = self.cluster.brokers[2]
        self.cluster.add_topic(Topic("testTopic3", 2))
        partition = self.cluster.topics['testTopic3'].partitions[0]
        partition.add_replica(b1, 0)
        partition.add_replica(b2, 1)
        partition = self.cluster.topics['testTopic3'].partitions[1]
        partition.add_replica(b1, 0)

        action = ActionBalanceEven(self.args, self.cluster)
        assert not action.check_topic_ok(self.cluster.topics['testTopic3'])
コード例 #2
0
ファイル: test_even.py プロジェクト: ambroff/kafka-tools
    def test_skip_topic_different_rf(self):
        b1 = self.cluster.brokers[1]
        b2 = self.cluster.brokers[2]
        self.cluster.add_topic(Topic("testTopic3", 2))
        partition = self.cluster.topics['testTopic3'].partitions[0]
        partition.add_replica(b1, 0)
        partition.add_replica(b2, 1)
        partition = self.cluster.topics['testTopic3'].partitions[1]
        partition.add_replica(b1, 0)

        action = ActionBalanceEven(self.args, self.cluster)
        assert not action.check_topic_ok(self.cluster.topics['testTopic3'])
コード例 #3
0
ファイル: test_even.py プロジェクト: xuwenyihust/kafka-tools
 def test_skip_topic_ok(self):
     action = ActionBalanceEven(self.args, self.cluster)
     assert action.check_topic_ok(self.cluster.topics['testTopic1'])
コード例 #4
0
ファイル: test_even.py プロジェクト: ambroff/kafka-tools
 def test_skip_topic_ok(self):
     action = ActionBalanceEven(self.args, self.cluster)
     assert action.check_topic_ok(self.cluster.topics['testTopic1'])