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

Jiangjie Qin commented on KAFKA-2103:
-------------------------------------

Personally, I think the tests should not assume anything out of its own 
control. I guess there are only few tests expecting no one listen on the port. 
Currently I only got these two failed tests, so it might be OK to just fix 
those two tests for now.
So for this ticket, how about let's do this:
1. Add some method like getNextUnusedPort() in TestUtil.
2. Fix those two tests using getNextUnusedPort()
If later on we see other tests failed because of the same reason, we can fix 
them in separate ticket.

> kafka.producer.AsyncProducerTest failure.
> -----------------------------------------
>
>                 Key: KAFKA-2103
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2103
>             Project: Kafka
>          Issue Type: Sub-task
>            Reporter: Jiangjie Qin
>            Assignee: Dong Lin
>
> I saw this test consistently failing on trunk.
> The recent changes are KAFKA-2099, KAFKA-1926, KAFKA-1809.
> kafka.producer.AsyncProducerTest > testNoBroker FAILED
>     org.scalatest.junit.JUnitTestFailedError: Should fail with 
> FailedToSendMessageException
>         at 
> org.scalatest.junit.AssertionsForJUnit$class.newAssertionFailedException(AssertionsForJUnit.scala:101)
>         at 
> org.scalatest.junit.JUnit3Suite.newAssertionFailedException(JUnit3Suite.scala:149)
>         at org.scalatest.Assertions$class.fail(Assertions.scala:711)
>         at org.scalatest.junit.JUnit3Suite.fail(JUnit3Suite.scala:149)
>         at 
> kafka.producer.AsyncProducerTest.testNoBroker(AsyncProducerTest.scala:300)
> kafka.producer.AsyncProducerTest > testIncompatibleEncoder PASSED
> kafka.producer.AsyncProducerTest > testRandomPartitioner PASSED
> kafka.producer.AsyncProducerTest > testFailedSendRetryLogic FAILED
>     kafka.common.FailedToSendMessageException: Failed to send messages after 
> 3 tries.
>         at 
> kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:91)
>         at 
> kafka.producer.AsyncProducerTest.testFailedSendRetryLogic(AsyncProducerTest.scala:415)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to