You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by jj...@apache.org on 2014/08/06 01:00:11 UTC
[14/37] git commit: kafka-1529;
transient unit test failure in testAutoCreateAfterDeleteTopic;
patched by Jun Rao; reviewed by Guozhang Wang and Neha Narkhede
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/transactional_messaging
Commit: 3e6b386b72b0d1a39621d7e166f2228c97646e1d
Parents: 4b3d03e
Author: Jun Rao <ju...@gmail.com>
Authored: Tue Jul 15 14:53:15 2014 -0700
Committer: Jun Rao <ju...@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