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

MockProcessorContext doesn't work with WindowStores

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7.0
    • Component/s: streams, streams-test-utils
    • Labels:
      None

      Description

      The recommended pattern for testing custom Processor implementations is to use the test-utils MockProcessorContext. If a Processor implementation needs a store, the store also has to be initialized with the same context. However, the existing (in-memory and persistent) Windowed store implementations perform internal casts that result in class cast exceptions if you attempt to initialize them with the MockProcessorContext.

      A workaround is to instead embed the processor in an application and use the TopologyTestDriver instead.

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              vvcephei John Roesler
              Reporter:
              vvcephei John Roesler

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment