kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ij...@apache.org
Subject [kafka] branch trunk updated: MINOR: Reduce replica.fetch.backoff.ms in ReassignPartitionsClusterTest (#5887)
Date Sat, 02 Feb 2019 20:38:37 GMT
This is an automated email from the ASF dual-hosted git repository.

ijuma pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 66129b1  MINOR: Reduce replica.fetch.backoff.ms in ReassignPartitionsClusterTest
(#5887)
66129b1 is described below

commit 66129b15181615a16e524c52c036cbb15aa25910
Author: Stanislav Kozlovski <stanislav_kozlovski@outlook.com>
AuthorDate: Sat Feb 2 12:38:28 2019 -0800

    MINOR: Reduce replica.fetch.backoff.ms in ReassignPartitionsClusterTest (#5887)
    
    The default backoff of 1000ms when there are no partitions to fetch can cause `shouldExecuteThrottledReassignment`
to fail due to it taking too long. So we reduce
    it to 100ms.
    
    Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>, Ismael Juma <ismael@juma.me.uk
---
 .../scala/unit/kafka/admin/ReassignPartitionsClusterTest.scala    | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/core/src/test/scala/unit/kafka/admin/ReassignPartitionsClusterTest.scala b/core/src/test/scala/unit/kafka/admin/ReassignPartitionsClusterTest.scala
index 1438da1..654a92e 100644
--- a/core/src/test/scala/unit/kafka/admin/ReassignPartitionsClusterTest.scala
+++ b/core/src/test/scala/unit/kafka/admin/ReassignPartitionsClusterTest.scala
@@ -51,8 +51,12 @@ class ReassignPartitionsClusterTest extends ZooKeeperTestHarness with Logging
{
   }
 
   def startBrokers(brokerIds: Seq[Int]) {
-    servers = brokerIds.map(i => createBrokerConfig(i, zkConnect, enableControlledShutdown
= false, logDirCount = 3))
-      .map(c => createServer(KafkaConfig.fromProps(c)))
+    servers = brokerIds.map { i =>
+      val props = createBrokerConfig(i, zkConnect, enableControlledShutdown = false, logDirCount
= 3)
+      // shorter backoff to reduce test durations when no active partitions are eligible
for fetching due to throttling
+      props.put(KafkaConfig.ReplicaFetchBackoffMsProp, "100")
+      props
+    }.map(c => createServer(KafkaConfig.fromProps(c)))
   }
 
   def createAdminClient(servers: Seq[KafkaServer]): JAdminClient = {


Mime
View raw message