kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guozhang Wang (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (KAFKA-3538) Abstract the creation/retrieval of Producer for stream sinks for unit testing
Date Fri, 01 Jul 2016 16:57:11 GMT

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

Guozhang Wang resolved KAFKA-3538.
----------------------------------
       Resolution: Duplicate
    Fix Version/s:     (was: 0.10.1.0)
                   0.10.0.1

> Abstract the creation/retrieval of Producer for stream sinks for unit testing
> -----------------------------------------------------------------------------
>
>                 Key: KAFKA-3538
>                 URL: https://issues.apache.org/jira/browse/KAFKA-3538
>             Project: Kafka
>          Issue Type: New Feature
>          Components: streams
>    Affects Versions: 0.10.1.0
>            Reporter: Michael Coon
>            Assignee: Guozhang Wang
>            Priority: Minor
>              Labels: semantics
>             Fix For: 0.10.0.1
>
>
> The StreamThread creates producer/consumers directly as KafkaProducer and KafkaConsumer,
thus eliminating my ability to unit test my streams code without having an active Kafka nearby.
Could this be abstracted in a way that it relies on an optional ProducerProvider or ConsumerProvider
implementation that could inject a mock producer/consumer for unit testing? We do this in
all our kafka code for unit testing and if a provider is not offered at runtime, we create
the concrete KafkaProdocer/Consumer components by default.



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

Mime
View raw message