You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ne...@apache.org on 2013/02/27 00:21:40 UTC

git commit: KAFKA-773 kafka.integration.PrimitiveApiTest fails intermittently; reviewed by Neha Narkhede

Updated Branches:
  refs/heads/0.8 76a4fbfb1 -> 37ca9db78


KAFKA-773 kafka.integration.PrimitiveApiTest fails intermittently; reviewed by Neha Narkhede


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

Branch: refs/heads/0.8
Commit: 37ca9db782b43180385704201633ca38e932b4cf
Parents: 76a4fbf
Author: Swapnil Ghike <sg...@linkedin.com>
Authored: Tue Feb 26 15:21:24 2013 -0800
Committer: Neha Narkhede <ne...@gmail.com>
Committed: Tue Feb 26 15:21:31 2013 -0800

----------------------------------------------------------------------
 .../unit/kafka/integration/PrimitiveApiTest.scala  |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/37ca9db7/core/src/test/scala/unit/kafka/integration/PrimitiveApiTest.scala
----------------------------------------------------------------------
diff --git a/core/src/test/scala/unit/kafka/integration/PrimitiveApiTest.scala b/core/src/test/scala/unit/kafka/integration/PrimitiveApiTest.scala
index 007e85d..2fc08d3 100644
--- a/core/src/test/scala/unit/kafka/integration/PrimitiveApiTest.scala
+++ b/core/src/test/scala/unit/kafka/integration/PrimitiveApiTest.scala
@@ -332,6 +332,13 @@ class PrimitiveApiTest extends JUnit3Suite with ProducerConsumerTestHarness with
     TestUtils.waitUntilTrue(() => { servers.head.logManager.getLog("test3", 0).get.logEndOffset == 2 }, 1000)
     TestUtils.waitUntilTrue(() => { servers.head.logManager.getLog("test4", 0).get.logEndOffset == 2 }, 1000)
 
+    val replicaId = servers.head.config.brokerId
+    val hwWaitMs = config.replicaHighWatermarkCheckpointIntervalMs
+    TestUtils.waitUntilTrue(() => { servers.head.replicaManager.getReplica("test1", 0, replicaId).get.highWatermark == 2 }, hwWaitMs)
+    TestUtils.waitUntilTrue(() => { servers.head.replicaManager.getReplica("test2", 0, replicaId).get.highWatermark == 2 }, hwWaitMs)
+    TestUtils.waitUntilTrue(() => { servers.head.replicaManager.getReplica("test3", 0, replicaId).get.highWatermark == 2 }, hwWaitMs)
+    TestUtils.waitUntilTrue(() => { servers.head.replicaManager.getReplica("test4", 0, replicaId).get.highWatermark == 2 }, hwWaitMs)
+
     // test if the consumer received the messages in the correct order when producer has enabled request pipelining
     val request = builder.build()
     val response = consumer.fetch(request)