This is an automated email from the ASF dual-hosted git repository. junrao pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/kafka.git
commit 8100fd92afd6c4615bf7a6998a8a8eeb0d628d4e Author: Sandor Murakozi <smurak...@gmail.com> AuthorDate: Thu Mar 1 14:47:47 2018 -0800 removed method updatedLeaderIsrAndControllerEpochs --- core/src/test/scala/unit/kafka/zk/KafkaZkClientTest.scala | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/src/test/scala/unit/kafka/zk/KafkaZkClientTest.scala b/core/src/test/scala/unit/kafka/zk/KafkaZkClientTest.scala index 9590ecd..e44c2c9 100644 --- a/core/src/test/scala/unit/kafka/zk/KafkaZkClientTest.scala +++ b/core/src/test/scala/unit/kafka/zk/KafkaZkClientTest.scala @@ -700,8 +700,6 @@ class KafkaZkClientTest extends ZooKeeperTestHarness { val initialLeaderIsrAndControllerEpochs: Map[TopicPartition, LeaderIsrAndControllerEpoch] = leaderIsrAndControllerEpochs(0, 0) - private def updatedLeaderIsrAndControllerEpochs(state: Int): Map[TopicPartition, LeaderIsrAndControllerEpoch] = - leaderIsrAndControllerEpochs(state, state - 1) val initialLeaderIsrs: Map[TopicPartition, LeaderAndIsr] = initialLeaderIsrAndControllerEpochs.mapValues(_.leaderAndIsr) private def leaderIsrs(state: Int, zkVersion: Int): Map[TopicPartition, LeaderAndIsr] = @@ -843,18 +841,18 @@ class KafkaZkClientTest extends ZooKeeperTestHarness { assertEquals( expectedSetDataResponses(topicPartition10, topicPartition11)(Code.OK, statWithVersion(1)), - zkClient.setTopicPartitionStatesRaw(updatedLeaderIsrAndControllerEpochs(1)).map { + zkClient.setTopicPartitionStatesRaw(leaderIsrAndControllerEpochs(state = 1, zkVersion = 0)).map { eraseMetadataAndStat}.toList) val getResponses = zkClient.getTopicPartitionStatesRaw(topicPartitions10_11) assertEquals(2, getResponses.size) - topicPartitions10_11.zip(getResponses) foreach {case (tp, r) => checkGetDataResponse(updatedLeaderIsrAndControllerEpochs(1), tp, r)} + topicPartitions10_11.zip(getResponses) foreach {case (tp, r) => checkGetDataResponse(leaderIsrAndControllerEpochs(state = 1, zkVersion = 0), tp, r)} // Other ZK client can also write the state of a partition assertEquals( expectedSetDataResponses(topicPartition10, topicPartition11)(Code.OK, statWithVersion(2)), - otherZkClient.setTopicPartitionStatesRaw(updatedLeaderIsrAndControllerEpochs(2)).map { + otherZkClient.setTopicPartitionStatesRaw(leaderIsrAndControllerEpochs(state = 2, zkVersion = 1)).map { eraseMetadataAndStat}.toList) } -- To stop receiving notification emails like this one, please contact jun...@apache.org.