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

Rohit Deshpande commented on KAFKA-10788:
-----------------------------------------

[~sagarrao] [~guozhang] I started making changes to 
CachingInMemoryKeyValueStoreTest but seems like it's more complicated than it 
seems. 
 # CachingInMemoryKeyValueStoreTest extends from AbstractKeyValueStoreTest 
which requires store object to be created. I believe it requires real 
underlying store rather than mocked one. Also I believe we want all store test 
classes to extend from AbstractKeyValueStoreTest. 
 # There are few tests cases which i can convert to use mock classes but other 
ones like 
[shouldAvoidFlushingDeletionsWithoutDirtyKeys|https://github.com/apache/kafka/blob/trunk/streams/src/test/java/org/apache/kafka/streams/state/internals/CachingInMemoryKeyValueStoreTest.java#L134]
 require real underlying store. Mocking won't make sense over there. 
 # Test cases in MeteredKeyValueStoreTest are not comprehensive so I am not 
sure how to go about this. Please let me know how to go about this. 

> Streamlining Tests in CachingInMemoryKeyValueStoreTest
> ------------------------------------------------------
>
>                 Key: KAFKA-10788
>                 URL: https://issues.apache.org/jira/browse/KAFKA-10788
>             Project: Kafka
>          Issue Type: Improvement
>          Components: streams, unit tests
>            Reporter: Sagar Rao
>            Assignee: Rohit Deshpande
>            Priority: Major
>              Labels: newbie
>
> While reviewing, kIP-614, it was decided that tests for 
> [CachingInMemoryKeyValueStoreTest.java|https://github.com/apache/kafka/pull/9508/files/899b79781d3412658293b918dce16709121accf1#diff-fdfe70d8fa0798642f0ed54785624aa9850d5d86afff2285acdf12f2775c3588]
>  need to be streamlined to use mocked underlyingStore.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to