kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject kafka git commit: kafka-2271; transient unit test failure in KafkaConfigConfigDefTest.testFromPropsToProps; patched by Jason Gustafson; reviewed by Jun Rao
Date Fri, 17 Jul 2015 00:29:31 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 1e0ed7a59 -> 5033b9613


kafka-2271; transient unit test failure in KafkaConfigConfigDefTest.testFromPropsToProps;
patched by Jason Gustafson; reviewed by Jun Rao


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

Branch: refs/heads/trunk
Commit: 5033b9613e9e9f28c8eb60a734920d90d155e6f9
Parents: 1e0ed7a
Author: Jason Gustafson <ason@confluent.io>
Authored: Thu Jul 16 17:29:25 2015 -0700
Committer: Jun Rao <junrao@gmail.com>
Committed: Thu Jul 16 17:29:25 2015 -0700

----------------------------------------------------------------------
 .../scala/unit/kafka/server/KafkaConfigConfigDefTest.scala   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/5033b961/core/src/test/scala/unit/kafka/server/KafkaConfigConfigDefTest.scala
----------------------------------------------------------------------
diff --git a/core/src/test/scala/unit/kafka/server/KafkaConfigConfigDefTest.scala b/core/src/test/scala/unit/kafka/server/KafkaConfigConfigDefTest.scala
index 98a5b04..04a02e0 100644
--- a/core/src/test/scala/unit/kafka/server/KafkaConfigConfigDefTest.scala
+++ b/core/src/test/scala/unit/kafka/server/KafkaConfigConfigDefTest.scala
@@ -134,7 +134,7 @@ class KafkaConfigConfigDefTest extends JUnit3Suite {
     Assert.assertEquals(expectedConfig.compressionType, actualConfig.compressionType)
   }
 
-  private def atLeastXIntProp(x: Int): String = (nextInt(Int.MaxValue - 1) + x).toString
+  private def atLeastXIntProp(x: Int): String = (nextInt(Int.MaxValue - x) + x).toString
 
   private def atLeastOneIntProp: String = atLeastXIntProp(1)
 
@@ -157,9 +157,9 @@ class KafkaConfigConfigDefTest extends JUnit3Suite {
         case KafkaConfig.QueuedMaxRequestsProp => expected.setProperty(name, atLeastOneIntProp)
 
         case KafkaConfig.PortProp => expected.setProperty(name, "1234")
-        case KafkaConfig.HostNameProp => expected.setProperty(name, nextString(10))
+        case KafkaConfig.HostNameProp => expected.setProperty(name, "hostname")
         case KafkaConfig.ListenersProp => expected.setProperty(name, "PLAINTEXT://:9092")
-        case KafkaConfig.AdvertisedHostNameProp => expected.setProperty(name, nextString(10))
+        case KafkaConfig.AdvertisedHostNameProp => expected.setProperty(name, "advertised.hostname")
         case KafkaConfig.AdvertisedPortProp => expected.setProperty(name, "4321")
         case KafkaConfig.AdvertisedListenersProp => expected.setProperty(name, "PLAINTEXT://:2909")
         case KafkaConfig.SocketRequestMaxBytesProp => expected.setProperty(name, atLeastOneIntProp)
@@ -225,7 +225,7 @@ class KafkaConfigConfigDefTest extends JUnit3Suite {
         case KafkaConfig.ReplicaLagTimeMaxMsProp => expected.setProperty(name, atLeastXIntProp(321))
         //require(offsetCommitRequiredAcks >= -1 && offsetCommitRequiredAcks <=
offsetsTopicReplicationFactor)
         case KafkaConfig.OffsetCommitRequiredAcksProp => expected.setProperty(name, "-1")
-        case KafkaConfig.OffsetsTopicReplicationFactorProp => expected.setProperty(name,
inRangeIntProp(-1, Short.MaxValue))
+        case KafkaConfig.OffsetsTopicReplicationFactorProp => expected.setProperty(name,
inRangeIntProp(1, Short.MaxValue))
         //BrokerCompressionCodec.isValid(compressionType)
         case KafkaConfig.CompressionTypeProp => expected.setProperty(name, randFrom(BrokerCompressionCodec.brokerCompressionOptions))
 


Mime
View raw message