KAFKA-4157; Transient system test failure in replica_verification_test.test_replica_lags

…t.test_replica_lags

Author: Grant Henke <granthenke@gmail.com>

Reviewers: Ashish Singh <asingh@cloudera.com>, Ismael Juma <ismael@juma.me.uk>

Closes #1849 from granthenke/replica-verification-fix

(cherry picked from commit b5bc1a1caa)
Signed-off-by: Ismael Juma <ismael@juma.me.uk>
This commit is contained in:
Grant Henke 2016-09-17 22:47:56 +01:00 committed by Ismael Juma
parent ea8c1b3942
commit ee6e50024d
1 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@ class ReplicaVerificationTool(KafkaPathResolverMixin, BackgroundThreadService):
partition: a partition of the topic
"""
topic_partition = topic + ',' + str(partition)
lag = self.partition_lag[topic_partition]
lag = self.partition_lag.get(topic_partition, -1)
self.logger.debug("Retuning lag for {} as {}".format(topic_partition, lag))
return lag
@ -84,4 +84,4 @@ class ReplicaVerificationTool(KafkaPathResolverMixin, BackgroundThreadService):
def clean_node(self, node):
node.account.kill_process("java", clean_shutdown=False, allow_fail=True)
node.account.ssh("rm -rf /mnt/replica_verification_tool.log", allow_fail=False)
node.account.ssh("rm -rf /mnt/replica_verification_tool.log", allow_fail=False)