Repository: kafka
Updated Branches:
  refs/heads/trunk a36befd81 -> 68ad80f85


KAFKA-2415; Fix transient failure in LogRecoveryTest

Author: Jiangjie Qin <becket....@gmail.com>
Author: Jiangjie Qin <j...@jqin-ld1.linkedin.biz>

Reviewers: Ismael Juma, Gwen Shapira

Closes #121 from becketqin/KAFKA-2415 and squashes the following commits:

7a9f453 [Jiangjie Qin] Addressed Ismael's comment
346103c [Jiangjie Qin] KAFKA-2415: Fix transient failure in LogRecoveryTest


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/68ad80f8
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/68ad80f8
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/68ad80f8

Branch: refs/heads/trunk
Commit: 68ad80f8524931222d78a8125cd012321d784337
Parents: a36befd
Author: Jiangjie Qin <becket....@gmail.com>
Authored: Fri Aug 7 16:16:34 2015 -0700
Committer: Gwen Shapira <csh...@gmail.com>
Committed: Fri Aug 7 16:16:34 2015 -0700

----------------------------------------------------------------------
 core/src/test/scala/unit/kafka/server/LogRecoveryTest.scala | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/68ad80f8/core/src/test/scala/unit/kafka/server/LogRecoveryTest.scala
----------------------------------------------------------------------
diff --git a/core/src/test/scala/unit/kafka/server/LogRecoveryTest.scala 
b/core/src/test/scala/unit/kafka/server/LogRecoveryTest.scala
index 7688f26..21081ce 100755
--- a/core/src/test/scala/unit/kafka/server/LogRecoveryTest.scala
+++ b/core/src/test/scala/unit/kafka/server/LogRecoveryTest.scala
@@ -210,6 +210,9 @@ class LogRecoveryTest extends JUnit3Suite with 
ZooKeeperTestHarness {
     sendMessages(2)
     hw += 2
 
+    // allow some time for the follower to create replica
+    TestUtils.waitUntilTrue(() => server1.replicaManager.getReplica(topic, 
0).nonEmpty,
+      "Failed to create replica in follower after timeout")
     // allow some time for the follower to get the leader HW
     TestUtils.waitUntilTrue(() =>
       server1.replicaManager.getReplica(topic, 
0).get.highWatermark.messageOffset == hw,

Reply via email to