[ 
https://issues.apache.org/jira/browse/KAFKA-1897?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gwen Shapira updated KAFKA-1897:
--------------------------------
    Fix Version/s:     (was: 0.8.3)

> Enhance MockProducer for more sophisticated tests
> -------------------------------------------------
>
>                 Key: KAFKA-1897
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1897
>             Project: Kafka
>          Issue Type: Bug
>          Components: producer 
>            Reporter: Navina Ramesh
>            Assignee: Jun Rao
>
> Based on the experience of upgrading the kafka producer in Samza, we faced 
> two main constraints when using MockProducer: 
> 1. The constructor requires a cluster specification and the tools to create a 
> test cluster is not exposed. It is available from TestUtils in Kafka, however 
> that jar is not published. This issue is currently being addressed in 
> KAFKA-1861.
> 2. No support for testing a blocking client call. For example, "flush" in 
> Samza blocks on the future returned by the latest send request. In order to 
> test this, the MockProducer which buffers it should run in a concurrent mode. 
> There is currently no provision to do this. We want the MockProducer to 
> buffer the send and then, complete the callback concurrently while we wait 
> for "flush" to unblock. 
> We can write unit tests that have improved coverage if we can add support for 
> concurrent execution of the MockProducer and unit test thread. For example 
> implementation, please refer to the latest version of 
> KafkaSystemProducer.scala in the Apache Samza repository.



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

Reply via email to