kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject git commit: kafka-1529; transient unit test failure in testAutoCreateAfterDeleteTopic; patched by Jun Rao; reviewed by Guozhang Wang and Neha Narkhede
Date Tue, 15 Jul 2014 21:53:22 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 4b3d03e8e -> 3e6b386b7


kafka-1529; transient unit test failure in testAutoCreateAfterDeleteTopic; patched by Jun
Rao; reviewed by Guozhang Wang and Neha Narkhede


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

Branch: refs/heads/trunk
Commit: 3e6b386b72b0d1a39621d7e166f2228c97646e1d
Parents: 4b3d03e
Author: Jun Rao <junrao@gmail.com>
Authored: Tue Jul 15 14:53:15 2014 -0700
Committer: Jun Rao <junrao@gmail.com>
Committed: Tue Jul 15 14:53:15 2014 -0700

----------------------------------------------------------------------
 .../unit/kafka/admin/DeleteTopicTest.scala      | 31 --------------------
 1 file changed, 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/3e6b386b/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 5d3c57a..29cc01b 100644
--- a/core/src/test/scala/unit/kafka/admin/DeleteTopicTest.scala
+++ b/core/src/test/scala/unit/kafka/admin/DeleteTopicTest.scala
@@ -203,37 +203,6 @@ class DeleteTopicTest extends JUnit3Suite with ZooKeeperTestHarness {
   }
 
   @Test
-  def testAutoCreateAfterDeleteTopic() {
-    val topicAndPartition = TopicAndPartition("test", 0)
-    val topic = topicAndPartition.topic
-    val servers = createTestTopicAndCluster(topic)
-    // start topic deletion
-    AdminUtils.deleteTopic(zkClient, topic)
-    verifyTopicDeletion(topic, servers)
-    // test if first produce request after topic deletion auto creates the topic
-    val props = new Properties()
-    props.put("metadata.broker.list", servers.map(s => s.config.hostName + ":" + s.config.port).mkString(","))
-    props.put("serializer.class", "kafka.serializer.StringEncoder")
-    props.put("producer.type", "sync")
-    props.put("request.required.acks", "1")
-    props.put("message.send.max.retries", "1")
-    val producerConfig = new ProducerConfig(props)
-    val producer = new Producer[String, String](producerConfig)
-    try {
-      producer.send(new KeyedMessage[String, String](topic, "test", "test1"))
-    } catch {
-      case e: FailedToSendMessageException => fail("Topic should have been auto created")
-      case oe: Throwable => fail("fails with exception", oe)
-    }
-    // test the topic path exists
-    assertTrue("Topic not auto created", ZkUtils.pathExists(zkClient, ZkUtils.getTopicPath(topic)))
-    // wait until leader is elected
-    val leaderIdOpt = TestUtils.waitUntilLeaderIsElectedOrChanged(zkClient, topic, 0, 1000)
-    assertTrue("New leader should be elected after re-creating topic test", leaderIdOpt.isDefined)
-    servers.foreach(_.shutdown())
-  }
-
-  @Test
   def testDeleteNonExistingTopic() {
     val topicAndPartition = TopicAndPartition("test", 0)
     val topic = topicAndPartition.topic


Mime
View raw message