kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gwens...@apache.org
Subject kafka git commit: MINOR: Remove usage of deprecated junit.framework.Assert
Date Tue, 08 Mar 2016 02:24:21 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 94c234341 -> 33fcaad26


MINOR: Remove usage of deprecated junit.framework.Assert

Author: Grant Henke <granthenke@gmail.com>

Reviewers: Gwen Shapira

Closes #938 from granthenke/junit-dep


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

Branch: refs/heads/trunk
Commit: 33fcaad26ed2b48dcc3a41c1c71d95eeb3779168
Parents: 94c2343
Author: Grant Henke <granthenke@gmail.com>
Authored: Mon Mar 7 18:24:16 2016 -0800
Committer: Gwen Shapira <cshapi@gmail.com>
Committed: Mon Mar 7 18:24:16 2016 -0800

----------------------------------------------------------------------
 .../test/scala/unit/kafka/admin/AdminTest.scala |  2 +-
 .../unit/kafka/admin/ConfigCommandTest.scala    |  2 +-
 .../unit/kafka/admin/DeleteTopicTest.scala      |  4 +--
 .../unit/kafka/admin/TopicCommandTest.scala     |  2 +-
 .../unit/kafka/server/KafkaConfigTest.scala     | 34 ++++++++++----------
 5 files changed, 22 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/33fcaad2/core/src/test/scala/unit/kafka/admin/AdminTest.scala
----------------------------------------------------------------------
diff --git a/core/src/test/scala/unit/kafka/admin/AdminTest.scala b/core/src/test/scala/unit/kafka/admin/AdminTest.scala
index 3aa971b..7c2577c 100755
--- a/core/src/test/scala/unit/kafka/admin/AdminTest.scala
+++ b/core/src/test/scala/unit/kafka/admin/AdminTest.scala
@@ -16,10 +16,10 @@
  */
 package kafka.admin
 
-import junit.framework.Assert._
 import org.apache.kafka.common.errors.InvalidTopicException
 import org.apache.kafka.common.metrics.Quota
 import org.apache.kafka.common.protocol.ApiKeys
+import org.junit.Assert._
 import org.junit.Test
 import java.util.Properties
 import kafka.utils._

http://git-wip-us.apache.org/repos/asf/kafka/blob/33fcaad2/core/src/test/scala/unit/kafka/admin/ConfigCommandTest.scala
----------------------------------------------------------------------
diff --git a/core/src/test/scala/unit/kafka/admin/ConfigCommandTest.scala b/core/src/test/scala/unit/kafka/admin/ConfigCommandTest.scala
index 6f7141a..bcfcfad 100644
--- a/core/src/test/scala/unit/kafka/admin/ConfigCommandTest.scala
+++ b/core/src/test/scala/unit/kafka/admin/ConfigCommandTest.scala
@@ -16,8 +16,8 @@
  */
 package kafka.admin
 
-import junit.framework.Assert._
 import kafka.admin.ConfigCommand.ConfigCommandOptions
+import org.junit.Assert._
 import org.junit.Test
 import kafka.utils.Logging
 import kafka.zk.ZooKeeperTestHarness

http://git-wip-us.apache.org/repos/asf/kafka/blob/33fcaad2/core/src/test/scala/unit/kafka/admin/DeleteTopicTest.scala
----------------------------------------------------------------------
diff --git a/core/src/test/scala/unit/kafka/admin/DeleteTopicTest.scala b/core/src/test/scala/unit/kafka/admin/DeleteTopicTest.scala
index d28ca69..477dcc8 100644
--- a/core/src/test/scala/unit/kafka/admin/DeleteTopicTest.scala
+++ b/core/src/test/scala/unit/kafka/admin/DeleteTopicTest.scala
@@ -18,10 +18,10 @@ package kafka.admin
 
 import kafka.log.Log
 import kafka.zk.ZooKeeperTestHarness
-import junit.framework.Assert._
-import kafka.utils.{ZkUtils, TestUtils}
+import kafka.utils.TestUtils
 import kafka.utils.ZkUtils._
 import kafka.server.{KafkaServer, KafkaConfig}
+import org.junit.Assert._
 import org.junit.Test
 import java.util.Properties
 import kafka.common.{TopicAlreadyMarkedForDeletionException, TopicAndPartition}

http://git-wip-us.apache.org/repos/asf/kafka/blob/33fcaad2/core/src/test/scala/unit/kafka/admin/TopicCommandTest.scala
----------------------------------------------------------------------
diff --git a/core/src/test/scala/unit/kafka/admin/TopicCommandTest.scala b/core/src/test/scala/unit/kafka/admin/TopicCommandTest.scala
index fd6cdda..d554b02 100644
--- a/core/src/test/scala/unit/kafka/admin/TopicCommandTest.scala
+++ b/core/src/test/scala/unit/kafka/admin/TopicCommandTest.scala
@@ -16,8 +16,8 @@
  */
 package kafka.admin
 
-import junit.framework.Assert._
 import kafka.common.TopicExistsException
+import org.junit.Assert._
 import org.junit.Test
 import kafka.utils.Logging
 import kafka.utils.TestUtils

http://git-wip-us.apache.org/repos/asf/kafka/blob/33fcaad2/core/src/test/scala/unit/kafka/server/KafkaConfigTest.scala
----------------------------------------------------------------------
diff --git a/core/src/test/scala/unit/kafka/server/KafkaConfigTest.scala b/core/src/test/scala/unit/kafka/server/KafkaConfigTest.scala
index aac50bd..c5a0079 100755
--- a/core/src/test/scala/unit/kafka/server/KafkaConfigTest.scala
+++ b/core/src/test/scala/unit/kafka/server/KafkaConfigTest.scala
@@ -19,13 +19,13 @@ package kafka.server
 
 import java.util.Properties
 
-import junit.framework.Assert._
 import kafka.api.{ApiVersion, KAFKA_0_8_2}
 import kafka.message._
 import kafka.utils.{CoreUtils, TestUtils}
 import org.apache.kafka.common.config.ConfigException
 import org.apache.kafka.common.protocol.SecurityProtocol
-import org.junit.{Assert, Test}
+import org.junit.Assert._
+import org.junit.Test
 import org.scalatest.Assertions.intercept
 
 class KafkaConfigTest {
@@ -583,21 +583,21 @@ class KafkaConfigTest {
     defaults.put(KafkaConfig.OffsetsTopicCompressionCodecProp, SnappyCompressionCodec.codec.toString)
 
     val config = KafkaConfig.fromProps(defaults)
-    Assert.assertEquals("127.0.0.1:2181", config.zkConnect)
-    Assert.assertEquals(1234, config.zkConnectionTimeoutMs)
-    Assert.assertEquals(false, config.brokerIdGenerationEnable)
-    Assert.assertEquals(1, config.maxReservedBrokerId)
-    Assert.assertEquals(1, config.brokerId)
-    Assert.assertEquals("127.0.0.1", config.hostName)
-    Assert.assertEquals(1122, config.advertisedPort)
-    Assert.assertEquals("127.0.0.1", config.advertisedHostName)
-    Assert.assertEquals(Map("127.0.0.1" -> 2, "127.0.0.2" -> 3), config.maxConnectionsPerIpOverrides)
-    Assert.assertEquals(List("/tmp1", "/tmp2"), config.logDirs)
-    Assert.assertEquals(12 * 60L * 1000L * 60, config.logRollTimeMillis)
-    Assert.assertEquals(11 * 60L * 1000L * 60, config.logRollTimeJitterMillis)
-    Assert.assertEquals(10 * 60L * 1000L * 60, config.logRetentionTimeMillis)
-    Assert.assertEquals(123L, config.logFlushIntervalMs)
-    Assert.assertEquals(SnappyCompressionCodec, config.offsetsTopicCompressionCodec)
+    assertEquals("127.0.0.1:2181", config.zkConnect)
+    assertEquals(1234, config.zkConnectionTimeoutMs)
+    assertEquals(false, config.brokerIdGenerationEnable)
+    assertEquals(1, config.maxReservedBrokerId)
+    assertEquals(1, config.brokerId)
+    assertEquals("127.0.0.1", config.hostName)
+    assertEquals(1122, config.advertisedPort)
+    assertEquals("127.0.0.1", config.advertisedHostName)
+    assertEquals(Map("127.0.0.1" -> 2, "127.0.0.2" -> 3), config.maxConnectionsPerIpOverrides)
+    assertEquals(List("/tmp1", "/tmp2"), config.logDirs)
+    assertEquals(12 * 60L * 1000L * 60, config.logRollTimeMillis)
+    assertEquals(11 * 60L * 1000L * 60, config.logRollTimeJitterMillis)
+    assertEquals(10 * 60L * 1000L * 60, config.logRetentionTimeMillis)
+    assertEquals(123L, config.logFlushIntervalMs)
+    assertEquals(SnappyCompressionCodec, config.offsetsTopicCompressionCodec)
   }
 
   private def assertPropertyInvalid(validRequiredProps: => Properties, name: String, values:
Any*) {


Mime
View raw message