You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ju...@apache.org on 2015/01/19 18:05:40 UTC

kafka git commit: KAFKA-1878; ProducerFailureHandlingTest.testCannotSendToInternalTopic fails with TimeoutException while trying to fetch metadata for topic; patched by jaikiran pai; reviewed by Jun Rao

Repository: kafka
Updated Branches:
  refs/heads/trunk 49d7f8ee1 -> 07cff7636


KAFKA-1878; ProducerFailureHandlingTest.testCannotSendToInternalTopic fails with TimeoutException while trying to fetch metadata for topic; patched by jaikiran pai; 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/07cff763
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/07cff763
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/07cff763

Branch: refs/heads/trunk
Commit: 07cff763633f20f51310e4f123963aaa0c008b2f
Parents: 49d7f8e
Author: jaikiran pai <ja...@gmail.com>
Authored: Mon Jan 19 09:05:25 2015 -0800
Committer: Jun Rao <ju...@gmail.com>
Committed: Mon Jan 19 09:05:25 2015 -0800

----------------------------------------------------------------------
 .../integration/kafka/api/ProducerFailureHandlingTest.scala     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/07cff763/core/src/test/scala/integration/kafka/api/ProducerFailureHandlingTest.scala
----------------------------------------------------------------------
diff --git a/core/src/test/scala/integration/kafka/api/ProducerFailureHandlingTest.scala b/core/src/test/scala/integration/kafka/api/ProducerFailureHandlingTest.scala
index 420a1dd..90c0b7a 100644
--- a/core/src/test/scala/integration/kafka/api/ProducerFailureHandlingTest.scala
+++ b/core/src/test/scala/integration/kafka/api/ProducerFailureHandlingTest.scala
@@ -53,6 +53,9 @@ class ProducerFailureHandlingTest extends KafkaServerTestHarness {
       // the issue by overriding offsets.topic.replication.factor to 1 for now. When we fix KAFKA-1867, we need to
       // remove the following config override.
       override val offsetsTopicReplicationFactor = 1.asInstanceOf[Short]
+      // Set a smaller value for the number of partitions for the offset commit topic (__consumer_offset topic)
+      // so that the creation of that topic/partition(s) and subsequent leader assignment doesn't take relatively long
+      override val offsetsTopicPartitions = 1
     }
 
 
@@ -309,7 +312,7 @@ class ProducerFailureHandlingTest extends KafkaServerTestHarness {
     val thrown = intercept[ExecutionException] {
       producer2.send(new ProducerRecord[Array[Byte],Array[Byte]](Topic.InternalTopics.head, "test".getBytes, "test".getBytes)).get
     }
-    assertTrue(thrown.getCause.isInstanceOf[InvalidTopicException])
+    assertTrue("Unexpected exception while sending to an invalid topic " + thrown.getCause, thrown.getCause.isInstanceOf[InvalidTopicException])
   }
 
   @Test