[ 
https://issues.apache.org/jira/browse/KAFKA-6460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16757803#comment-16757803
 ] 

Yishun Guan edited comment on KAFKA-6460 at 1/31/19 11:32 PM:
--------------------------------------------------------------

Hi [~guozhang] , I still not quite understand - so we should implement 
_StoreTestDriver_ class that will be providing _MockStoreSupplier_ and 
_MockStoreBuilder_ classes? _Or StoreSupplier and StoreBuilder doesn't have to 
be mock, but this StoreTestDriver_ will contain these two as variables and wrap 
around those _and provide auxiliary methods (like createKeyValueStore or 
getSizeOfStore) for testing purpose_? Is a KIP needed? thanks


was (Author: shung):
Hi [~guozhang] , I still not quite understand - so we should implement 
_StoreTestDriver_ class that will be providing _MockStoreSupplier_ and 
_MockStoreBuilder_ classes_?_ Or StoreSupplier and StoreBuilder doesn't have to 
be mock, but this _StoreTestDriver_ will contain these two as variables and 
wrap around those __ and provide auxiliary methods (like createKeyValueStore or 
getSizeOfStore) for testing purpose_?_ Is a KIP needed? thanks

> Add mocks for state stores used in Streams unit testing
> -------------------------------------------------------
>
>                 Key: KAFKA-6460
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6460
>             Project: Kafka
>          Issue Type: Improvement
>          Components: streams, unit tests
>            Reporter: Guozhang Wang
>            Assignee: Yishun Guan
>            Priority: Major
>              Labels: newbie++
>
> We'd like to use mocks for different types of state stores: kv, window, 
> session that can be used to record the number of expected put / get calls 
> used in the DSL operator unit testing. This involves implementing the two 
> interfaces {{StoreSupplier}} and {{StoreBuilder}} that can return a object 
> created from, say, EasyMock, and the object can then be set up with the 
> expected calls.
> In addition, we should also add a mock record collector which can be returned 
> from the mock processor context so that with logging enabled store, users can 
> also validate if the changes have been forwarded to the changelog as well.



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

Reply via email to