kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject [30/37] git commit: KAFKA-773 kafka.integration.PrimitiveApiTest fails intermittently; reviewed by Neha Narkhede
Date Mon, 04 Mar 2013 04:22:00 GMT
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/trunk
Commit: 37ca9db782b43180385704201633ca38e932b4cf
Parents: 76a4fbf
Author: Swapnil Ghike <sghike@linkedin.com>
Authored: Tue Feb 26 15:21:24 2013 -0800
Committer: Neha Narkhede <neha.narkhede@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)


Mime
View raw message