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

Bruno Cadonna commented on KAFKA-10788:
---------------------------------------

[~rohitdeshaws], Thank you for looking into this!

# I think you are better off if you start a new test class 
{{CachingKeyValueStore}} that does not extend {{AbstractKeyValueStoreTest}}. 
Keep in mind that you only want to test the code in {{CachingKeyValueStore}} 
and not the code in the underlying store.
# You do not need a real underlying store for 
{{shouldAvoidFlushingDeletionsWithoutDirtyKeys}}. You can specify the methods 
that should be called on the mock for the underlying store with {{replay()}} 
and you can verify the calls on the mock with {{verify()}}. See the EasyMock 
docs for more details.
# Are you familiar with EasyMock? If not, I can imagine that some tests might 
not seem comprehensive at first sight. See the EasyMock docs to understand them 
better and let us know what you do not understand.

Hope that helps to unblock you.    

> 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