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

Dong Lin commented on KAFKA-2103:
---------------------------------

This test case fails because a local process on Jiangjie's machine is listening 
to a port which the test case assumes should not be monitored. 

The easiest solution is to check if there is local processing running on the 
port after the test case fails unexpectedly. A proper solution may require us 
to replace all hard-coded port numbers used in Kafka test cases with 
dynamically allocated port numbers (e.g. getNextUnusedPort()), which should not 
be used at the time the port number is allocated. 

The importance and implementation of such a function may require further 
discussion in the community. Will hold on until we have an agreement on the 
solution.


> 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