Rajini Sivaram created KAFKA-3217:
-------------------------------------

             Summary: Unit tests which dont close producers auto-create topics 
in Kafka brokers of other tests when port is reused
                 Key: KAFKA-3217
                 URL: https://issues.apache.org/jira/browse/KAFKA-3217
             Project: Kafka
          Issue Type: Bug
          Components: unit tests
    Affects Versions: 0.9.0.0
            Reporter: Rajini Sivaram
            Assignee: Rajini Sivaram


Consumer tests occasionally fail the exception:

{quote}
kafka.common.TopicExistsException: Topic "topic" already exists.
        at 
kafka.admin.AdminUtils$.createOrUpdateTopicPartitionAssignmentPathInZK(AdminUtils.scala:261)
        at kafka.admin.AdminUtils$.createTopic(AdminUtils.scala:245)
        at kafka.utils.TestUtils$.createTopic(TestUtils.scala:237)
        at kafka.api.BaseConsumerTest.setUp(BaseConsumerTest.scala:65)
{quote}

Recreated this failure with some additional logging and it turns out that the 
failure is because a few tests which create a topic named "topic" close their 
Kafka server, but not the producer. When the ephemeral port used by the closed 
Kafka server gets reused in another Kafka server in a subsequent test, the 
producer retries of the previous test cause "topic" to be recreated using 
auto-create in the new Kafka server of the subsequent test.  This results in an 
error in the consumer tests occasionally when the topic is auto-created before 
the test attempts to create it.





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

Reply via email to