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

Chanchal Singh edited comment on KAFKA-5676 at 8/6/17 5:27 PM:
---------------------------------------------------------------

Thanks Wang . I tried doing that but found that in few test cases they are 
dependent on Metrics object modified by StreamsMetricsImpl object and the value 
of Metrics object is then tested. I am also confused how MockStreamMetrics is 
acting as mock class ff its not returning any mocking behaviour. 
Is there any difference in using StreamsMetricsImpl directly instead of 
MockStreamMetrics class in current case?



was (Author: chanchal.kafka):
Thanks Wang . I tried doing that but found that in few test cases they are 
dependent on Metrics object modified by StreamsMetricsImpl object and the value 
of Metrics object is then tested. I am also confused how MockStreamMetrics is 
acting as mock class ff its not returning any mocking behaviour. 
Is there any difference in using StreamsMetricsImpl directly instead of 
MockStreamMetrics class ?


> MockStreamsMetrics should be in o.a.k.test
> ------------------------------------------
>
>                 Key: KAFKA-5676
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5676
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>            Reporter: Guozhang Wang
>            Assignee: Chanchal Singh
>              Labels: newbie
>
> {{MockStreamsMetrics}}'s package should be `o.a.k.test` not 
> `o.a.k.streams.processor.internals`. 
> In addition, it should not require a {{Metrics}} parameter in its constructor 
> as it is only needed for its extended base class; the right way of mocking 
> should be implementing {{StreamsMetrics}} with mock behavior than extended a 
> real implementaion of {{StreamsMetricsImpl}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to