You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Matthias J. Sax (JIRA)" <ji...@apache.org> on 2018/01/23 20:03:00 UTC

[jira] [Created] (KAFKA-6473) Add MockProcessorContext to public test-utils

Matthias J. Sax created KAFKA-6473:
--------------------------------------

             Summary: Add MockProcessorContext to public test-utils
                 Key: KAFKA-6473
                 URL: https://issues.apache.org/jira/browse/KAFKA-6473
             Project: Kafka
          Issue Type: Improvement
          Components: streams
    Affects Versions: 1.1.0
            Reporter: Matthias J. Sax


With KIP-247, we added public test-utils artifact with a TopologyTestDriver class. Using the test driver for a single Processor/Transformer/ValueTransformer it's required to specify a whole topology with source and sink and plus the Processor/Transformer/ValueTransformer into it.

For unit testing, it might be more convenient to have a MockProcessorContext, that can be used to test the Processor/Transformer/ValueTransformer in isolation. Ie, the test itself creates new Processor/Transformer/ValueTransformer object and calls init() manually passing in the MockProcessorContext.

This is a public API change and requires a KIP: https://cwiki.apache.org/confluence/display/KAFKA/Kafka+Improvement+Proposals



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)