Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
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
- is duplicated by
-
KAFKA-8630 Unit testing a streams processor with a WindowStore throws a ClassCastException
- Resolved
- is related to
-
KAFKA-10215 MockProcessorContext doesn't work with SessionStores
- Resolved
- links to