Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-6473

Add MockProcessorContext to public test-utils

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.0
    • Fix Version/s: 2.0.0
    • Component/s: streams

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vvcephei John Roesler
                Reporter:
                mjsax Matthias J. Sax
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: