[ 
https://issues.apache.org/jira/browse/KAFKA-1260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13915113#comment-13915113
 ] 

Jay Kreps commented on KAFKA-1260:
----------------------------------

These tests don't seem to pass, Neha did you actually run them? The test is 
looking for Kafka exception but the logic was changed to directly throw 
IllegalArgument/IllegalStateException:


kafka.api.ProducerFailureHandlingTest > testInvalidPartition FAILED
    org.scalatest.junit.JUnitTestFailedError: Expected exception 
org.apache.kafka.common.KafkaException to be thrown, but 
java.lang.IllegalArgumentException was thrown.
        at 
org.scalatest.junit.AssertionsForJUnit$class.newAssertionFailedException(AssertionsForJUnit.scala:102)
        at 
org.scalatest.junit.JUnit3Suite.newAssertionFailedException(JUnit3Suite.scala:142)
        at org.scalatest.Assertions$class.intercept(Assertions.scala:487)
        at org.scalatest.junit.JUnit3Suite.intercept(JUnit3Suite.scala:142)
        at 
kafka.api.ProducerFailureHandlingTest.testInvalidPartition(ProducerFailureHandlingTest.scala:221)

        Caused by:
        java.lang.IllegalArgumentException: Invalid partition given with 
record: 1 is not in the range [0...1].
            at 
org.apache.kafka.clients.producer.internals.Partitioner.partition(Partitioner.java:52)
            at 
org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:215)
            at 
org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:148)
            at 
kafka.api.ProducerFailureHandlingTest$$anonfun$testInvalidPartition$1.apply(ProducerFailureHandlingTest.scala:222)
            at 
kafka.api.ProducerFailureHandlingTest$$anonfun$testInvalidPartition$1.apply(ProducerFailureHandlingTest.scala:222)
            at org.scalatest.Assertions$class.intercept(Assertions.scala:480)
            ... 2 more

kafka.api.ProducerFailureHandlingTest > testSendAfterClosed FAILED
    org.scalatest.junit.JUnitTestFailedError: Expected exception 
org.apache.kafka.common.KafkaException to be thrown, but 
java.lang.IllegalStateException was thrown.
        at 
org.scalatest.junit.AssertionsForJUnit$class.newAssertionFailedException(AssertionsForJUnit.scala:102)
        at 
org.scalatest.junit.JUnit3Suite.newAssertionFailedException(JUnit3Suite.scala:142)
        at org.scalatest.Assertions$class.intercept(Assertions.scala:487)
        at org.scalatest.junit.JUnit3Suite.intercept(JUnit3Suite.scala:142)
        at 
kafka.api.ProducerFailureHandlingTest.testSendAfterClosed(ProducerFailureHandlingTest.scala:247)

        Caused by:
        java.lang.IllegalStateException: Cannot send after the producer is 
closed.
            at 
org.apache.kafka.clients.producer.internals.RecordAccumulator.append(RecordAccumulator.java:115)
            at 
org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:218)
            at 
org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:148)
            at 
kafka.api.ProducerFailureHandlingTest$$anonfun$testSendAfterClosed$1.apply(ProducerFailureHandlingTest.scala:249)
            at 
kafka.api.ProducerFailureHandlingTest$$anonfun$testSendAfterClosed$1.apply(ProducerFailureHandlingTest.scala:247)
            at org.scalatest.Assertions$class.intercept(Assertions.scala:480)
            ... 2 more

kafka.api.ProducerFailureHandlingTest > testBrokerFailure PASSED

8 tests completed, 2 failed

> Integration Test for New Producer Part II: Broker Failure Handling
> ------------------------------------------------------------------
>
>                 Key: KAFKA-1260
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1260
>             Project: Kafka
>          Issue Type: Sub-task
>          Components: producer 
>            Reporter: Guozhang Wang
>            Assignee: Guozhang Wang
>         Attachments: KAFKA-1260-fix.patch, KAFKA-1260.patch, 
> KAFKA-1260_2014-02-13_15:14:21.patch, KAFKA-1260_2014-02-14_15:00:16.patch, 
> KAFKA-1260_2014-02-19_13:49:19.patch, KAFKA-1260_2014-02-19_15:55:06.patch, 
> KAFKA-1260_2014-02-20_15:26:54.patch, KAFKA-1260_2014-02-20_15:45:11.patch, 
> KAFKA-1260_2014-02-25_16:58:27.patch, KAFKA-1260_2014-02-25_17:46:14.patch, 
> KAFKA-1260_2014-02-26_09:47:08.patch, KAFKA-1260_2014-02-26_13:49:24.patch, 
> KAFKA-1260_2014-02-27_09:37:17.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to